8
Validation
Calvin edited this page 2013-11-14 01:37:15 +08:00
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

##Overview 在Service接口(SOAP/REST)一般会使用JSR303 BeanValidator (Hibernate Validator实现)进行验证。

而在Web页面一般会使用JQuery Validation Plugin实现客户端认证因为对用户体验比较友好。

如果可能存在恶意用户会绕过校验的js直接发送Post请求则需要Spring MVC与Hibernate Validator结合的服务端认证另外有些规则可能JQuery Validation Plugin未提供且不容易用js来添加, 两者最好同时使用。

##Details