The validator is in the Struts nightly source downloads in the contrib/validator directory. I also keep the documentation and some downloads posted at this url. The most current will always be in the nightly downloads.
http://home.earthlink.net/~dwinterfeldt/ The most recent release has the min/max length validations. The 7/2/2001 release was the last one made with Struts v1.0. It doesn't have the min/max length, but you can make a 'mask2' validator (as you can in most releases). David --- "Trieu, Danny" <[EMAIL PROTECTED]> wrote: > I guess I am already behind...:) can you give me > links to where I can read > more > about these validator framework and where I can > download the sample and > distribution? > > Thanks, > > --danny > > -----Original Message----- > From: David Winterfeldt > [mailto:[EMAIL PROTECTED]] > Sent: Monday, October 22, 2001 10:43 AM > To: [EMAIL PROTECTED] > Subject: RE: Questions About Struts Validator > > > What feature are you referring to? the min/max > validators or defining a second mask validator as > 'mask2'? Also, this would depend on the validator > version you are using. Are you asking if the latest > release will work with Struts 1.0? It should. > Someone said they were using a more current release > of > the validator with the Struts 1.0 release. It uses > the commons packages (bean, digester, and > collections) > though so you would need to add them to your > WEB-INF/lib directory. > > David > > --- "Trieu, Danny" <[EMAIL PROTECTED]> wrote: > > is this feature available in Struts 1.0? > > > > -----Original Message----- > > From: David Winterfeldt > > [mailto:[EMAIL PROTECTED]] > > Sent: Sunday, October 21, 2001 1:04 PM > > To: [EMAIL PROTECTED] > > Subject: RE: Questions About Struts Validator > > > > > > That isn't possible with the default mask > validator. > > > > I've recently added a min and max length > validation > > to > > nightly builds though. Or you could either write > > your > > own mask validation method that accepts multiple > > inputs or you can define the mask validator again > > under a different name like mask2. > > > > <validator name="mask2" > > > > > classname="com.wintecinc.struts.validation.StrutsValidator" > > method="validateMask" > > depends="required" > > msg="errors.invalid"> > > > > > > <field property="lastName" > > depends="required,mask,mask2"> > > <msg name="mask" > > key="registrationForm.lastname.maskmsg"/> > > <msg name="mask2" > > key="registrationForm.lastname.mask2msg"/> > > <arg0 > > key="registrationForm.lastname.displayname"/> > > <arg1 name="maxlength" > key="${var:maxlength}" > > resource="false"/> > > <var> > > <var-name>mask</var-name> > > <var-value>^[a-z]*$</var-value> > > </var> > > <var> > > <var-name>mask2</var-name> > > <var-value>^[A-Z]*$</var-value> > > </var> > > <var> > > <var-name>maxlength</var-name> > > <var-value>16</var-value> > > </var> > > </field> > > > > > > David > > > > --- Paul Darling <[EMAIL PROTECTED]> > > wrote: > > > Is is possible to use multiple 'mask' validators > > > that apply different > > > expressions? > > > > > > For instance, in addition to checking that a > > string > > > contains only a-z or A-Z > > > characters, you might want to validate the > string > > > length. It's possible to > > > use an expression that combines the types of > > > validation (e.g. > > > ^[a-zA-Z0-9]{,16}$), but then it's not possible > to > > > use an error message that > > > is specific to whether the validation failed due > > to > > > the character content or > > > the length. > > > > > > Paul > > > > > > -----Original Message----- > > > From: David Winterfeldt > > > [mailto:[EMAIL PROTECTED]] > > > Sent: Thursday, October 11, 2001 1:17 PM > > > To: [EMAIL PROTECTED] > > > Subject: RE: Questions About Struts Validator > > > > > > > > > This is what you were asking about though? > > > Everything > > > makes sense now? > > > > > > David > > > > > > --- Vaughan Jackson > > <[EMAIL PROTECTED]> > > > wrote: > > > > David, > > > > > > > > I am sorry, I hadn't understood this before. > > > > > > > > Thanks again, > > > > Vaughan. > > > > > > > > > -----Original Message----- > > > > > From: David Winterfeldt > > > > [mailto:[EMAIL PROTECTED]] > > > > > Sent: Thursday, October 11, 2001 12:17 PM > > > > > To: [EMAIL PROTECTED] > > > > > Subject: RE: Questions About Struts > Validator > > > > > > > > > > > > > > > For Q2: > > > > > You can override the default validator's > error > > > > message > > > > > by specifying a msg element or you can > change > > > the > > > > > defult of course. > > > > > > > > > > <field property="lastName" > > > > > depends="required,mask"> > > > > > <msg name="mask" > > > > > key="registrationForm.lastname.maskmsg"/> > > > > > <arg0 > > > > > > key="registrationForm.lastname.displayname"/> > > > > > <var> > > > > > <var-name>mask</var-name> > > > > > > > > <var-value>^[a-zA-Z]*$</var-value> > > > > > </var> > > > > > </field> > > > > > > > > > > You can also specify different arguments to > go > > > > with > > > > > different errors. > > > > > > > > > > <field property="integer" > > > > > depends="required,integer,range"> > > > > > <arg0 > > > key="typeForm.integer.displayname"/> > > > > > <arg1 name="range" key="${var:min}" > > > > > resource="false"/> > > > > > <arg2 name="range" key="${var:max}" > > > > > resource="false"/> > > > > > <var> > > > > > <var-name>min</var-name> > > > > > <var-value>10</var-value> > > > > > </var> > > > > > <var> > > > > > <var-name>max</var-name> > > > > > <var-value>20</var-value> > > > > > </var> > > > > > </field> > > > > > > > > > > David > > > > > > > > > > > > > > > --- Vaughan Jackson > === message truncated === __________________________________________________ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com