Multiple Error messages for Single regex validation
Joined: Oct 04, 2007
I am trying to validate a text field in Primefaces with # validations like
1. That field should have maximum of 99.99
2. That field should not allow alphabets
3. There should not be more than 2 digits after decimal point.
I have done the validation in regex . But I am unable to display the error messages according to the validation. I should display 3 error messages for the single text box validation. Please help me to do this using regex in annotation.
I would typically use spring's JSR-303 support in addition with hibernate-validator. You can override the default messages for different constraint violations or implement your own custom constraints, annotations etc. I have used this with Spring-MVC but I don't really use JSF all that much. If your question is more JSF specific maybe the moderator can move this post to the JSF forum instead.