This page describes the XML schemas used to validate the XML descriptors of Bean Validation.
XML Namespaces
As of Bean Validation 2.0, the XML namespaces of the descriptors are:
-
http://xmlns.jcp.org/xml/ns/validation/configuration
for META-INF/validation.xml -
http://xmlns.jcp.org/xml/ns/validation/mapping
for constraint mapping XML files
For Bean Validation 1.x the XML namespaces are:
-
http://jboss.org/xml/ns/javax/validation/configuration
for META-INF/validation.xml -
http://jboss.org/xml/ns/javax/validation/mapping
for constraint mapping XML files
Using the Bean Validation XML Schemas
XML descriptors for Bean Validation 1.1 and later must specify the used schema version using the version
attribute in the root element, e.g. like so:
<?xml version="1.0" encoding="UTF-8"?>
<validation-config
xmlns="http://xmlns.jcp.org/xml/ns/validation/configuration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/validation/configuration validation-configuration-2.0.xsd"
version="2.0">
[...]
</validation-config>
This allows XML descriptor processors to use the version information to choose the appropriate version of the schema document(s) to process XML descriptor instances.
Bean Validation 2.0 Schema Resources
Date Published | File Name | Description | Specification Section | Status |
---|---|---|---|---|
July 11 2017 |
Bean Validation configuration schema |
Submitted to Final Approval Ballot |
||
July 11 2017 |
Bean Validation constraint mapping schema |
Submitted to Final Approval Ballot |
Bean Validation 1.1 Schema Resources
Date Published | File Name | Description | Specification Section | Status |
---|---|---|---|---|
May 24 2013 |
Bean Validation configuration schema |
Final Release |
||
May 24 2013 |
Bean Validation constraint mapping schema |
Final Release |