XSD facet validation errors
Read the named facet: pattern, enumeration, minInclusive and length constrain different properties. Use a value permitted by the agreed schema. Do not widen an enumeration or weaken a pattern just to hide an invalid export.
Check the restriction on the base type
Read the named facet: pattern, enumeration, minInclusive and length constrain different properties. Use a value permitted by the agreed schema. Do not widen an enumeration or weaken a pattern just to hide an invalid export.
Reproduced engine diagnostics and complete fixes
Original minimal examples checked on 2 November 2026. Engine wording differs; follow the cause, not a message alone.
libxml2-wasm 0.7.2
Element 'r': [facet 'enumeration'] The value 'bad' is not an element of the set {'ok'}.Xerces2-J 2.12.2 / Temurin Java 21.0.13+9-LTS
cvc-enumeration-valid: Value 'bad' is not facet-valid with respect to enumeration '[ok]'. It must be a value from the enumeration.
cvc-type.3.1.3: The value 'bad' of element 'r' is not valid.lxml 6.0.2 / libxml2 2.14.6
Element 'r': [facet 'enumeration'] The value 'bad' is not an element of the set {'ok'}..NET 10.0.14 / System.Xml
The 'r' element is invalid - The value 'bad' is invalid according to its datatype 'String' - The Enumeration constraint failed.Complete XSD (before)
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="r"><xs:simpleType><xs:restriction base="xs:string"><xs:enumeration value="ok"/></xs:restriction></xs:simpleType></xs:element></xs:schema>libxml2-wasm 0.7.2
Element 'r': [facet 'pattern'] The value 'ab' is not accepted by the pattern '[A-Z]{2}'.Xerces2-J 2.12.2 / Temurin Java 21.0.13+9-LTS
cvc-pattern-valid: Value 'ab' is not facet-valid with respect to pattern '[A-Z]{2}' for type '#AnonType_r'.
cvc-type.3.1.3: The value 'ab' of element 'r' is not valid.lxml 6.0.2 / libxml2 2.14.6
Element 'r': [facet 'pattern'] The value 'ab' is not accepted by the pattern '[A-Z]{2}'..NET 10.0.14 / System.Xml
The 'r' element is invalid - The value 'ab' is invalid according to its datatype 'String' - The Pattern constraint failed.Complete XSD (before)
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="r"><xs:simpleType><xs:restriction base="xs:string"><xs:pattern value="[A-Z]{2}"/></xs:restriction></xs:simpleType></xs:element></xs:schema>libxml2-wasm 0.7.2
Element 'r': '0' is not a valid value of the atomic type 'xs:positiveInteger'.Xerces2-J 2.12.2 / Temurin Java 21.0.13+9-LTS
cvc-minInclusive-valid: Value '0' is not facet-valid with respect to minInclusive '1' for type 'positiveInteger'.
cvc-type.3.1.3: The value '0' of element 'r' is not valid.lxml 6.0.2 / libxml2 2.14.6
Element 'r': '0' is not a valid value of the atomic type 'xs:positiveInteger'..NET 10.0.14 / System.Xml
The 'r' element is invalid - The value '0' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:positiveInteger' - Value '0' was either too large or too small for PositiveInteger.Complete XSD (before)
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="r" type="xs:positiveInteger"/></xs:schema>Repeat this check in your workflow
API, Python CLI and GitHub Actions starter are available for automation. The public API is early access; paid CI authentication and SLA are not offered. Pro: US$19/month, 25-file batches and 10 saved schemas. Team: US$49/month, 100-file batches, 100 schemas and five seats.