Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Regarding struts validation frame work

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
What are all the advantages of using the struts validation frame work. We can use java script to validate the input from. can any body please tell me the advantage of using the validation frame work over java script.

Thanks in advance

prem
 
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"prem",

Welcome to JavaRanch. We don't have many rules here, but we do have a naming policy which we try to strictly enforce. Please re-read this document and edit your display name in order to comply. Thanks in advance, and we look forward to seeing you around the Ranch.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main benefit of using Validator over a custom Javascript solution is that Validator validates on the client side AND the server side. You can also add custom validators if the standard ones don't do what you want, and once you have a Validator defined you can reuse it on other forms very easily. Another benefit is that it handles internationalisation of validation error messages. Hope that helps.
 
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i18n is a big one. browser independent validation is another. javascript can be quirky from one to another. server-side validation is the safest. validatons like 'mask' that depends on regex can be hairy using js; likewise for indexed property validations.
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"prem/jonn",

Thank you for changing your display name but it still does not comply with our guidelines. You must have a valid first name and a valid last name. One name only is not allowed, as you will notice by looking at all the other users on this site. This isn't an issue with either of your names and I'm only pointing it out, but display names cannot sound obviously fictitious, and therefore most of us here just use our real names.
 
You don't know me, but I've been looking all over the world for. Thanks to the help from this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic