my dog learned polymorphism*
The moose likes JSF and the fly likes Problem jsf cutom validation -- validate method dont call Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Problem jsf cutom validation -- validate method dont call" Watch "Problem jsf cutom validation -- validate method dont call" New topic
Author

Problem jsf cutom validation -- validate method dont call

javier pavon
Greenhorn

Joined: Mar 03, 2010
Posts: 9
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
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15952
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem jsf cutom validation -- validate method dont call
 
Similar Threads
JSF validation not validating
empty space validation
Custom input validator
validator not invoke
Custom validator not validating