> From: Wendy Smoak [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 30, 2003 2:44 PM
> To: 'Struts Users Mailing List'
> Subject: RE: [VALIDATOR] requiredif ??
> 
> 
> James wrote:
> > A quick look at that configuration looks correct. Let me know if it 
> > doesn't work for you.
> 
> No, it doesn't.  It's as if that rule isn't even there-- if 
> there is no prospect, and there is a prospect name, even if 
> the address is blank, it passes validation and goes to the next step.

Dumb question: Are you sure you're running validations at all?

> 
> What about the action != Add Prospect part, have I done that 
> right?  I'm trying to compare the value of the action 
> parameter (it's a hidden field on the form) to the literal 
> String "Add Prospect".  (While we're at it, any chance of 
> comparing the value to a property in the 
> ApplicationResources.properties file?)

That's how it's supposed to work...

> 
> Are all of the rules (the <field> tags) totally separate?  I 
> mean, there's no chance one of the other <field> tags is 
> affecting this one, right?

It shouldn't, unless it's the same field name.

> 
> Also, the example in the docs uses indexed properties, which 
> I have never worked with.  Am I correct that the [] square 
> brackets in my <val> tags only have to do with multiple 
> conditions and have nothing to do with indexed properties?

You're correct, they're for identifying separate clauses in the
condition.


James Turner
Owner & Manager, Black Bear Software, LLC
[EMAIL PROTECTED]

Author: 
    MySQL & JSP Web Applications: 
        Data Driven Programming Using Tomcat and MySQL
    ISBN 0672323095; Sams, 2002

Co-Author: 
    Struts Kick Start
    ISBN 0672324725; Sams, 2002

Forthcoming:
    JavaServer Faces Kick Start 
    Sams, Fall 2003




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to