pub fn facet_constraint_code(err: &FacetError) -> &'static strExpand description
Map a FacetError variant to its specific cvc-* constraint code
This function returns the most specific constraint code for each facet type,
preferring codes like cvc-pattern-valid over generic cvc-facet-valid.
ยงMappings
| FacetError Variant | Constraint Code |
|---|---|
| LengthViolation | cvc-length-valid |
| MinLengthViolation | cvc-minLength-valid |
| MaxLengthViolation | cvc-maxLength-valid |
| PatternViolation | cvc-pattern-valid |
| EnumerationViolation | cvc-enumeration-valid |
| MinInclusiveViolation | cvc-minInclusive-valid |
| MaxInclusiveViolation | cvc-maxInclusive-valid |
| MinExclusiveViolation | cvc-minExclusive-valid |
| MaxExclusiveViolation | cvc-maxExclusive-valid |
| TotalDigitsViolation | cvc-totalDigits-valid |
| FractionDigitsViolation | cvc-fractionDigits-valid |
| ExplicitTimezoneViolation | cvc-explicitTimezone-valid |
| InvalidPattern | cvc-pattern-valid |
| DerivationRestriction | cos-st-restricts |
| FixedFacetViolation | cos-st-restricts |
| ConflictingFacets | cos-st-restricts |
| NotApplicable | cos-applicable-facets |