pub fn value_error_constraint_code(err: &ValidationError) -> &'static strExpand description
Map a TypeValidationError variant to its default cvc-* constraint code
Returns cvc-datatype-valid for lexical/type/range errors, and delegates
to facet_constraint_code() for facet violations.
§Constraint code context
cvc-datatype-valid(datatypes.html) is the default for lexical/type/range errors. Callers validating at the structures.html level (e.g., element or attribute value checks) should override tocvc-simple-typeinstead.FacetViolationdelegates tofacet_constraint_code(), which returnscvc-*-validfor runtime facet checks. Schema-levelFacetErrorvariants (DerivationRestriction,FixedFacetViolation,ConflictingFacets,NotApplicable) map tocos-*codes and should not appear during instance validation — they are schema compilation errors.