• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem jsf cutom validation -- validate method dont call  RSS feed

 
javier pavon
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have done a custom validation, i have followed this steps:

1.- Create class that implement Validator interface

2.- Register the validator en faces-config.xml

3.- Use the validator




And the problem it's that dont execute the validate method, but the required standar message is show.

anybody could help me?

Thanks a lot
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is one of those little things that nobody told me and I found out the hard way.

Validators are not invoked if no data is entered. The "required" attribute (if present) is invoked, instead.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!