• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts Validator Client side question

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using Struts Validator for client side javascript validation. I have single ActionForm that collects information across multiple pages. Some fields are required on one page while some on the next. I would like non-visible fields to not be validated by the form. How can I acheive the same?

The validator complains that I need to provide values for the fields that are not visible but still part of the form.

Thanks in advance for any assistance.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At the moment, I can't think of a way to turn validation off for some fields, but not for others.

I suppose you could put some sort of value in the fields to indicate "This field has not been filled out yet" that will allow it to pass validation. This seems kind of awkward to me, though, and not a very good solution.

You may end up having to create a separate ActionForm for each page and have each form bean copy its properties to a common bean that is kept in the session.
[ July 30, 2006: Message edited by: Merrill Higginson ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic