File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Open Source Projects and the fly likes Apache commons validator, bean properties to validate should all be string? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "Apache commons validator, bean properties to validate should all be string?" Watch "Apache commons validator, bean properties to validate should all be string?" New topic
Author

Apache commons validator, bean properties to validate should all be string?

Ali Pirzada
Greenhorn

Joined: Jul 29, 2012
Posts: 3
I was working on apache commons validator latest. Problem explained below.

My Bean is having 2 properties fullName (String) & age (int). Validation "required" on both but age needed to be checked for "integer" as well.


Note: Above is possible if age property is String but its not and setAge won't accept String value and throw exception before reaching validator.validate().

Validation should be checked before we set the bean. In above situation I need to make all properties string than in validation.xml check for integer/condition.

How I work with this when my age property is Integer. little confused?
 
I agree. Here's the link: jrebel
 
subject: Apache commons validator, bean properties to validate should all be string?
 
Similar Threads
[SPRING] Java Bean doesn't get prepared
LookupDispatch action with validator
validaion.xml and validaton-rules.xml file not calling
Cannot load a validator resource
struts validation framework error