File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding struts validation frame work

 
konda Raju
Greenhorn
Posts: 16
  • 0
  • 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
 
Jason Menard
Sheriff
Posts: 6450
  • 0
  • 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.
 
Ryan Dillon
Greenhorn
Posts: 11
  • 0
  • 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.
 
alan do
Ranch Hand
Posts: 354
  • 0
  • 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
  • 0
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic