Validating user input in fields
You can use a validation hook to verify that the information
a user has entered in a field is valid. If the information is not
valid, the user is prompted for valid information.
About this task
Because hooks can affect the behavior of a field, design and test hooks carefully before making them available to users. For example, this user input hook example effectively makes the user_number field a mandatory field, regardless of the setting in the Behaviors grid.