Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts Validator Client side question

 
Raghu Marpalli
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • 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.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic