File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Regarding struts validation frame work

konda Raju

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

Jason Menard

Joined: Nov 09, 2000
Posts: 6450

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

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="" target="_blank" rel="nofollow"></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="" target="_blank" rel="nofollow"></a>
Jason Menard

Joined: Nov 09, 2000
Posts: 6450

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:
subject: Regarding struts validation frame work
It's not a secret anymore!