Well I can't tell you the JS way, but surely I can tell you how to do it Struts way.
Your custom validator rule should first check for fields value. If not # then call the date validator: if(! ValidatorUtils.getValueAsString(bean, field.getProperty ()).equals("#")) { if(! FieldChecks.validateDate(bean, va, field, errors, validator, request)) { //Add some error message } } HTH, On 5/25/06, Stanislav <[EMAIL PROTECTED]> wrote:
The thing is that user can input nothing in filed, but if they input # than date validation is "skipped", but if input is different from # then date validation is executed. My idea was to change date validation to check if the input if equal #, but my knowledge of js is very limited, and dont know how to do that :-( can you give me some example? Tnx, Stanislav ----- Original Message Follows ----- > Write a custom validator rule, check for the field value and if the value is > not #, then set error message. > > HTH, > > > On 5/25/06, Stanislav <[EMAIL PROTECTED]> wrote: > > > > Hi! > > > > I want to change date validator-rules so ih the input data id equal "#" > > than return that everything > > is ok... How can i do that? > > > > Tnx, Stanislav > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Vinit Sharma IBM