Form Field Validation
Form fields may have a series of validation steps that are enforced by Wicket validation behavior. Wicket attempts to validate, then uses the standard feedback panel on the page to report errors.
In many cases, Wicket automatically produces validation text; however, these messages may not be user friendly or descriptive. All form fields must have a required-validation message associated with it in the text resources file. You can share these messages across pages if they relate to common form fields.
All pattern-validated form fields should have a pattern-validation message that relates to the field type; you can share these messages across pages.
- A label – sendMoney.recipient (Recipient MSISDN).
- An entry field name received by the Java code – recipient.
- A shared required-validation message – recipient.Required (Recipient is required).
- A shared pattern-validation message – recipient.PatternValidation (Input is not a valid MSISDN).