Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Validator framework - JS validation

 
Girish Varde
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
When using validator framework for client side field validation, should we add JS validation function to validatior-rules.xml? In Oreilly book, i's given that, JS function is generated. But one post in form link - http://raibledesigns.com/page/rd/20030226 , it says to add it to the rules file. I am getting confused. Can you please help me understand using JS in validator framework?
Thanks in advance.
Girish Varde
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Javascript code is automatically generated for all "out of the box" rules that ship with struts. If you write your own custom rule, you must also write some Javascript validation code to go with it if you expect client-side validation to work with that rule.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic