Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

struts validation - How are client-side and server side related?

Status
Not open for further replies.

lamagamorgana

Programmer
Apr 11, 2006
1
0
0
IT
Hi all,
I'm having some trouble with javascript client-side validation.
I'm using the basic validation rules: required, email, double, and I find out that while required and email work fine both server-side and client-side just by including the validation rule in validator-rules.xml, Double is missing the client-side validation. So i investigate further and find out that the syntax is the same, but even if i don't write any js code in the validator-rules.xml, it works automatically for the rules "required" and "email", and not for "double". I stumbled upon the org/apache/commons/validator/javascript apis and noticed that there are js files called exactly the same as the server-side method used for validation (that is validateRequired.js and validateEmail.js) but actually there is no validateDouble.js... are these things related?
Does Struts look for a js file in that particular library when you use a "standars" validation rule?
iI couldn't find a manual that told that.
So do i have to write a js validation rule for double??
thank you
fra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top