--- Ben Kafka <[EMAIL PROTECTED]> wrote: > Hi, > > I started using the struts validator package > about a week ago and have > the following questions: > > 1 - How do I get the validator to validate a > required field for a selection > box? > My selection is on an integer property. I noticed > in the > validator-rules.xml file it is checking for type > "select-one". What "type" > is a <html:select>? I tried replacing "select-one" > with "select" but it > still doesn't find it. The "select-one" is the correct type in Javascript for an html:select tag. I'm not sure what is in your select list, but if it is an integer how can you check that it is blank (zero length string) or null? You could use the range method to see if it falls in a range or write your own.
> > 2 - Cannot get the two password comparison example > working. I put in the > code specified under ~dwinterfeldt. Was wondering if > anyone has gotten this > working. The only difference I can see in my code > and the example was that I > am using StrutsValidatorUtil.getActionError instead > of > ValidatorUtil.getActionError (the latter the > compiler complained about no > such method signature). Was wondering if there was a > javascript method also > that could be included. No error messages? Everything works on the same principle. Does the validator definition in the xml have the same method and class defined as where the validation method actually is (no types)? You can make a Javascript method to match if you want to. You can follow one of the examples to see how to make a generic Javascript method. You have access to the error message and the variables you've defined in the Javascript. David > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > __________________________________________________ Do You Yahoo!? Yahoo! Greetings - Send FREE e-cards for every occasion! http://greetings.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>