struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerry Jalenak" <Jerry.Jale...@LABONE.com>
Subject RE: FW: {Validator] Required Fields
Date Tue, 22 Oct 2002 13:39:53 GMT
Eddie,

Yeah, I do - and I do this alot.  I've written several 'custom' validate
routines and use them without any problems.  My question/concern is to the
motive behind having the default validator-rules.xml always have the
'depend=required' attribute.  As Adam pointed out, some fields only need to
be validated if they contain a value.  Unless someone overrides the default
validator-rules or writes a custom method, there is no way to do this -
using mask, min, max, etc. will also force a 'required' condition...

Jerry

> -----Original Message-----
> From: Eddie Bush [mailto:ekbush@swbell.net]
> Sent: Tuesday, October 22, 2002 8:31 AM
> To: Struts Users Mailing List
> Subject: Re: FW: {Validator] Required Fields
> 
> 
> You do realize that you have full liberty to define your own 
> constraints, right?
> 
> Adam Sherman wrote:
> 
> > Jerry Jalenak wrote:
> >
> >> One thing I don't understand is, why would all of the 
> definitions in
> >> validator-rules.xml have the 'depend=required' attribute?  I would 
> >> think the
> >> application designer would want to be able to specify 
> which fields are
> >> required, etc. and not have validator make the choice for 
> him/her....
> >
> >
> > Maybe someone assumed that you would never want a field to 
> be (blank 
> > or valid). Some fields need to be validated only if they 
> contain a value.
> >
> > Can one of the developers comment on this?
> >
> > Thanks,
> >
> > A.
> >
> 
> -- 
> Eddie Bush
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:struts-user-help@jakarta.apache.org>
> 
> 

This transmission (and any information attached to it) may be confidential and is intended
solely for the use of the individual or entity to which it is addressed. If you are not the
intended recipient or the person responsible for delivering the transmission to the intended
recipient, be advised that you have received this transmission in error and that any use,
dissemination, forwarding, printing, or copying of this information is strictly prohibited.
If you have received this transmission in error, please immediately notify LabOne at (800)388-4675.



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message