Programming Guides › Programming Guide for Java › Validation Rules › About Validation Rules
About Validation Rules
Validation rules enforce requirements, such as in the following examples:
- A Quantity field must contain only numeric characters.
- A Telephone Number field must be formatted as nnn-nnn-nnnn.
- An Employee ID field must contain a number no higher than 9999.
- The value typed in a ZIP Code field must be appropriate for the values typed in the City and State field.
- Does the value typed in a Title field qualify the user for the security clearance typed in Security Level?
In addition to verifying a user entry, a validation rule can change an entry so that the entry conforms to the rule’s requirements without further user intervention, as in the following examples:
- A validation rule for a Telephone Number field requires that telephone numbers be formatted as nnn-nnn-nnnn. If a user types the value 9785551234, the validation rule automatically changes the entry to the correct format, 978-555-1234.
- A validation rule for a Department Number field requires that the number must be prefixed with a three-character code representing the name typed in the Region field. When the prefix is missing or incorrect, the validation rule supplies the correct prefix.
Changing an entry through a validation rule is named transformation.
More information:
Types of Validation Rules
Validation Rule Sets
Basics of Validation Rule Definition
Copyright © 2013 CA.
All rights reserved.
|
|