Java Reference
In-Depth Information
Annotations-Based Validation
The following section demonstrates how you can validate the user-entered data using annotations.
Figure 5-22 illustrates the modified files and newly added files in the application.
Figure 5-22. Modified files and new files in the directory structure for annotations-based validation
Listing 5-50 illustrates the BookValidator .
Listing 5-50. Validations in the BookValidator
1. package com.apress.bookstore.validator;
2.
3. import org.springframework.validation.Errors;
4. import org.springframework.validation.ValidationUtils;
5. import org.springframework.validation.Validator;
6.
 
Search WWH ::




Custom Search