Thanks again.
I tried the following:
In my action:
@RequiredStringValidator(key = "error.message", message = "")
public String getFirstName() {
return firstName;
}
I created the properties file just under my action with the name
"MyActionName.properties" with the following contents:
error.message = ${getText(firstName)} is required.
fieldFormat = ${getText(fieldName)} is not formatted properly.
But I do not the error message as: "error.message" instead of "firstName is
required"
Where am I erring ?
Thanks,
Tauri
Lukasz Lenart wrote:
>
>> Is it possible for me to have multilingual Validations using Annotation
>> Based Validations in Struts2 ?
>
> Yes, you can, just add key = some.error.message to your annotation, like
> below
>
> @RequiredStringValidator(key = "some.key")
> public void setFirstName(String firstName) {
> this.firstName = firstName;
> }
>
>
>
>
>
--
View this message in context:
http://www.nabble.com/Struts2-Annotation-based-Validation-tp16089678p16297696.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]