如何个性化富人的信息:验证者

时间:2011-08-20 11:01:09

标签: richfaces

我现在正在旅行一个web应用程序宽度jsf 2.0和richfaces 4.0 那么,请如何个性化富人的信息:验证者?

2 个答案:

答案 0 :(得分:0)

您可以在bean中的注释上自定义消息。

答案 1 :(得分:0)

你看看了吗? http://docs.jboss.org/richfaces/latest_4_0_X/Component_Reference/en-US/html/chap-Component_Reference-Validation.html

特别地:

 @Pattern(regexp = "^[\\w\\-]([\\.\\w])+[\\w]+@([\\w\\-]+\\.)+[a-zA-Z]{2,4}$" , message="Bad email")

   private String email = null;