• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Struts - Client side Validatoion

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using DynaActionForm with the Validator framework.
While doing client side validation, I am facing one problem as-
On the input jsp there are some fields for which i have written
one DynaActionForm. In the example I am working I want to validate
two fields depending upon each other.
e.g.
There are 2 fields 'Fax Number' and 'Email Address'. I want to
validate for either or condition. That is if 'Fax Number' is given
I dont need to do 'required' validation on the 'Email Address' and
vice versa.
But when i try to submit the form the js alert comes
'Email Address is Required' though i have entered value for 'Fax Number'.
Any solution will be appreciated.
 
Ranch Hand
Posts: 191
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try with validWhen or requiredIf Rules.
 
Kalyani Nayak
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No ,Its not working
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic