Validate on POST data
1. Basic validate on bean's attribute.
@Notnull
@Max
@Min
@Pattern
...
2. Validate by logic
1) password repeat if same (server validate/client validate)
@InitBinder("form") public void initBinder(WebDataBinder binder) { binder.addValidators(userCreateFormValidator); }
public class UserCreateFormValidator implements Validator {
...
}