commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Sheffey <AShef...@dtcc.com>
Subject Re: [validator] results with multiple validation actions bug?
Date Mon, 26 Sep 2005 13:02:58 GMT
Have you stepped through the code as it runs?  Have you defined the 
"required" action in your validator xml file?




"Charles Crouch" <charles_crouch@hotmail.com> 
09/25/2005 02:46 PM
Please respond to
"Jakarta Commons Users List" <commons-user@jakarta.apache.org>


To
commons-user@jakarta.apache.org
cc

Subject
[validator] results with multiple validation actions bug?






Hi
Just wanted to check whether some behaviour I'm seeing relating to having
multiple validation actions on a field is a bug or not.

I've set up a form with the following field...

<field property="lastName" depends="required,int">
<arg key="nameForm.lastname.displayname"/>
</field>

I then set the 'lastName' property on the bean I'm validating to...

12345678

and then do...

ValidatorResults results = validator.validate();
ValidatorResult lastNameResult = results.getValidatorResult("lastName");

I find that both of the following return true...

lastNameResult.containsAction("int");
lastNameResult.isValid("int");

but the following both return false...

lastNameResult.isValid("required");
lastNameResult.containsAction("required");

Is the fact that I'm getting false here a bug?

Thanks
Charles



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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message