标签:
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 {
...
}
标签:
原文地址:http://www.cnblogs.com/feika/p/4581334.html