myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorge Vásquez ...@3eyegroup.com>
Subject RE: Using personalized validation messages...
Date Thu, 14 Sep 2006 01:35:22 GMT
Thanks a lot Mike, it worked perfect!!!
Regards,
JV 

-----Mensaje original-----
De: Mike Kienenberger [mailto:mkienenb@gmail.com] 
Enviado el: miércoles, 13 de septiembre de 2006 20:26
Para: MyFaces Discussion
Asunto: Re: Using personalized validation messages...

I added a message attribute to all of the tomahawk validators.

<t:validateRegExpr pattern='\d{5}' message='No, really, dude, you
gotta put in a standard US zip code, ya know?'  />

should work.


On 9/13/06, Jorge Vásquez <jv@3eyegroup.com> wrote:
>
>
>
>
> Regards to all,
>
> Is there a way to make validators return personalized message Strings that
> are not necessarily found in message Bundles?
>
>
>
> For example, in the following code I would like to be able to specify the
> validator to use any message that I wished:
>
>               <h:inputText id="regExprValue"
value="#{validateForm.regExpr}"
> required="true">
>                 <t:validateRegExpr pattern='\d{5}' />
>             </h:inputText>
>                  <t:message id="regExprValueError" for="regExprValue"
> styleClass="error" />
>
> But unfortunately, in this case the tag validateRegExpr only has the
pattern
> attribute.
>
> Note:  In the past I have used the method of creating a message String in
a
> messageBundle with the same Id as the one used by the component but in
this
> case we are not using messageBundles as internationalization strategy for
> our project.
>
> Any ideas?
>
> Thanks,
> Jorge Vásquez
>
>
>


Mime
View raw message