This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Struts and the fly likes Validator Framework Vs JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Validator Framework Vs JavaScript" Watch "Validator Framework Vs JavaScript" New topic
Author

Validator Framework Vs JavaScript

Sandeep Vaid
Ranch Hand

Joined: Feb 27, 2006
Posts: 390
As javascript has some limitations like oldier browsers doesn't support it and once can disable javascript in it's browser, javascript will execute is not gaurrented. Other option is server side validation like Validator Framework but it's a server trip and hence will take more time.Also not all view level validation can be performed immediately (like disabling/enabling controls)

Can we combine javascript and validator in a way such that if user is using new browsers with javascript enabled, validation will be done on client side else on server side..The drawback of this approach is that we need to write 2 validations (client Side and server side) which will also be hard to maintain.

What are the best practices in struts to do the validation ?
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Validator Framework Vs JavaScript
 
Similar Threads
why different kind of validations in Struts.explain me
Validation in Spring
Validator..How to stop the validation after the first field?
Javascript and Struts validator
Struts 1.2 - Client and Server-side validations