How do I use Javascript to perform validation in Struts?

Ted Husted

The best way is using David Winderfeldt's Struts validator servlet. This provides seamless client-side and server-side validation using regular expressions.

Other than that, you can also attach other Javascript validation to the Struts form fields using the provided properties for Javascript event handling. Of course, these types of validations cannot be guaranteed if a browser has Javascript turned off.

Why doesn't Struts provide it's own facility for regex or Javascript validations?
David Winterfeldt's Validator is being integrated with Struts 1.1.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact