











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Instructions on how to use the apache struts validator framework, including configuring the validator plug-in, creating validation.xml and validation-rules.xml files, and setting up action forms for validation. It covers built-in validation rules such as required, minlength, maxlength, and mask, and explains how to use them in your application.
Typology: Slides
1 / 19
This page cannot be seen from the preview
Don't miss anything!












Built-in Validation Rules
**
errors.required={ 0 } is required. errors.minlength={ 0 } cannot be less than { 1 } characters. errors.maxlength={ 0 } cannot be greater than { 2 } characters. errors.invalid={ 0 } is invalid. errors.byte={ 0 } must be an byte. errors.short={ 0 } must be an short. errors.integer={ 0 } must be an integer. errors.long={ 0 } must be an long. errors.float={ 0 } must be an float. errors.double={ 0 } must be an double. errors.date={ 0 } is not a date. errors.range={ 0 } is not in the range { 1 } through { 2 }. errors.creditcard={ 0 } is not a valid credit card number. errors.email={ 0 } is an invalid e-mail address.
**
**
** **
struts-config.xml: logonForm (from
struts-examples sample code)
Element
All validation rules have to succeed