Any field may have one or more Constraints associated with it, which will automatically be enforced for any data that is set for the field. When a Constraint is violated, InRule triggers a validation message containing information about the field and Constraint that is in violation. Constraints that are violated result in the associated field being "invalid". Please see the Validity Templates section for more information.
Constraints are evaluated as one of the first steps to the "Apply Rules" process and are re-evaluated every time the value of the associated field has changed.
The Constraint violations can either be set to display the system Default message or custom tokenized messages. Tokenized messages may include one or more embedded rule expressions, such as <%RecID%> to display the contents of the RecID field in the message.
Constraints come in two flavors, they can either be set to "Deny" specified values or "Allow" only specified values.
- Available constraints include:
- =, <>, <, >, <=, >=
- Field Validations continue to be supported but Constraints are recommended for newly developed rule applications.
- When one or more XSD Schemas are in use, Min, Max and other facets are automatically imported as field Constraints. Enumeration facets are optionally imported as a Field Value List with a LimitToValueList field constraint set.
- When one or more .NET Assembly Schemas are in use, the Enums associated with any properties or fields are optionally imported as Field Value Lists with the LimitToValueList field constraint set.
For many rule applications, Constraints play an important role in providing low-level field validation for an overall validation scheme.
To view/edit constraints for an entity, click on the Create Constraints link:
Please sign in to leave a comment.