You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Fabio Falci Rodrigues <fa...@gmail.com> on 2009/07/01 20:07:10 UTC

ValidatorAction.isValid behavior

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