> So the java jar file influence the 
> validation and the message errors directly on html page. 


When you don't specifiy own messages/text-keys in validation annotations 
the bean-validation framework uses default messages. In your case these 
messages should come from hibernate-validation.jar.


Here is an example from struts docs how you can use an own text-key:

@NotNull(message="your.text.key.here") 


http://struts.apache.org/docs/bean-validation-plugin.html



Regards,
Christoph




> From: Chris <christal...@yahoo.fr>
> To: Lukasz Lenart <lukaszlen...@apache.org>, 
> "user@struts.apache.org" <user@struts.apache.org>, Struts Users 
> Mailing List <user@struts.apache.org>, 
> Date: 03.09.2015 11:38
> Subject: Re: about struts-examples apache/struts-examples -> bean-
> validation example
> 
> Hello, 
> 
> The bean-validation example works now, after adding 
jboss-logging-3.1.1.GA.jar
> 
> I didn't know I could use a jboss file jar with only Netbeans 7.3 
> and Apache Tomcat 7.0.34.So the java jar file influence the 
> validation and the message errors directly on html page. 
> 
> 
> PS : with the exclude_parameters example, the errors messages are 
> not in the same files
> =======================================
> exclude_parameters :
> EditAction.properties
> personBean.firstName=First name
> 
> EditAction-validation.xml
> <validators>
>  <validator type="requiredstring">
>      <param name="fieldname">personBean.firstName</param>
>      <message>First name is required.</message>
>  </validator>
> 
> ===================================
> 
> bean-validation ( All is in EditAction.properties ) 
> 
> EditAction.properties
> personBean.firstName=First name
> firstName.required=You must enter the first 
> name===============================================
> 
> Regards,
> 
> Chris
> 
> 

This Email was scanned by Sophos Anti Virus

Reply via email to