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="" 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

 

Reply via email to