© Brent Watson 2015
Brent WatsonStripes by Example10.1007/978-1-4842-0980-6_9

9. Validation

Brent Watson 
(1)
316 Marine Ave, Brooklyn, USA
 
 
Brent Watson
Data validation is a major headache for most web developers. Data must be validated for a number of potential problems before it can be used, such as checking for data that is blank/empty when it should not be (e.g., username fields), improperly formatted fields (e.g., phone numbers), invalid data types (e.g., age must be numeric), invalid lengths (e.g., password must be greater than six characters), and the list goes on.
Luckily, Stripes provides a very nice validation mechanism built into ActionBeans and exposed through field-level annotations. These are @Validate and ...

Get Stripes by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.