commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabio Falci Rodrigues <fabiofa...@gmail.com>
Subject ValidatorAction.isValid behavior
Date Wed, 01 Jul 2009 18:07:10 GMT
Hi!
I'm using commons-validator to validate a swing view, so far so good.
Now I have a question about the
org.apache.commons.validator.ValidatorAction.isValid
behavior.

It will return true if result is a true boolean or a non-value object.
If result is a false boolean or null then it returns false.

But now I'm checking
org.springmodules.validation.commons.FieldChecks
and
org.apache.struts.validator.FieldChecks

And both has the follow doc
"In general passing in a null or blank will return a null Object or a
false boolean.
However, nulls and blanks do not result in an error being added to the errors. "

My doubt is "...nulls and blanks do not result in an error..."
In my tests, I return a null object but that results in a error.
The null object is passed to isValid and then false is returned.

So, what do you guys think? Do I missing something or the FieldChecks
classes has a confusing doc?

Thanks
Fabio

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message