开发者

User friendly validation messages during persist or update

开发者 https://www.devze.com 2023-01-06 20:24 出处:网络
Can you suggest good practices for information related to validation messages in the user interface. Assuming you have a the following tables (User, Address, Email) and we use JPA to model our entitie

Can you suggest good practices for information related to validation messages in the user interface. Assuming you have a the following tables (User, Address, Email) and we use JPA to model our entities and the underlying validation provider is Hibernate.

The default messages which are throws when a value is empty or incorrect is either validator.required=val开发者_StackOverflow中文版ue is required validator.notNull=may not be null

It would be ideal to provide user friendly messages like.

Enter your password here Enter your first name Enter the city name City name cannot contain numerical characters

Any suggestions on web sites which already do this or a set of grammatically correct sample messages for the exisiting default keys shipped as part of hibernate validator jar will be useful.


I found this link from www.SmashingMagazine.com to be an excellent article on error messages, validation and other aspects of providing feedback to your site users.

0

精彩评论

暂无评论...
验证码 换一张
取 消