Validation rules for number, integer and currency attribute types
To better control the validation of number, currency and integer attribute types, you can use a set of facets.
The mandatory and optional facets are:
- Total number of digits
- Fraction digits
- Maximum Value (exclusive)
- Maximum Value (inclusive)
- Minimum Value (exclusive)
- Minimum Value (inclusive)
If the mandatory facets are not used, the attributes will be validated as before. It is not recommended to introduce these new facets on existing specs.
Number and currency attribute types
- Total number of digits
- Fraction digits
- Maximum Value (exclusive)
- Maximum Value (inclusive)
- Minimum Value (exclusive)
- Minimum Value (inclusive)
You must use both of these mandatory facets to be able to enforce the new validation rules for number and currency attribute types. If you use both of the mandatory facets, Maxlength and Precision are not used for validation. In addition, you can use one or more of the optional facets.
Attributes of type integer
- Total number of digits
- Maximum Value (exclusive)
- Maximum Value (inclusive)
- Minimum Value (exclusive)
- Minimum Value (inclusive)
You must use the mandatory facet to be able to enforce the new validation rules for integer attribute types. If you use the mandatory facet, Maxlength is not used for validation. In addition, you can use one or more of the optional facets.