aspose file tools*
The moose likes Struts and the fly likes Regarding struts validation frame work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Regarding struts validation frame work" Watch "Regarding struts validation frame work" New topic
Author

Regarding struts validation frame work

konda Raju
Greenhorn

Joined: Jan 20, 2000
Posts: 16
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

Joined: Nov 09, 2000
Posts: 6450
"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

Joined: May 24, 2005
Posts: 11
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.


Ryan Dillon<br />Code Canvas Technologies<br />RapidJ - Rapid Java Web Development<br /><a href="http://www.codecanvas.com.au/rapidj/" target="_blank" rel="nofollow">http://www.codecanvas.com.au/rapidj/</a>
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
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.


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
"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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding struts validation frame work
 
Similar Threads
difference between javascript and validator frame work
Struts Validator at client side
Struts + Error Message Display
validation frame work
why java script is not used in struts framework