Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validating s:select and s:checkbox with struts2 validator

 
D kukreja
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I validate for "required" for my s:select and s:checkbox fields.
I am using struts2 validator framework to perform front end validations. text boxes are getting validated properly. but for selection adn checkbox it always shows the field error.
Heres the xml part from my action-validation.xml

Heres from the jsp


Even if I select something in job role, it gives me error that noting is selected.
My question is "is it evenpossible to validate fields other than textfield " using struts 2 validator?
if not, how do I hook up my own javascript?
thanks
 
D kukreja
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I resolved this by using fieldexpression.
its working fine for me.thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic