Search the web
Sign In
New User? Sign Up
validation · Techniques for HTML form validation
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Server side validation   Message List  
Reply | Forward Message #289 of 427 |
Dear all,

first of all, thank you very much for this library, I have learnt
more javascript from it than from any book.

I have been using a customized version of the library for a while, in
prototype projects, and I am attempting to push it (or something like
it) as a shared component across our projects.

Now, I deal with enterprise web-fronted back-office applications.
This means that I cannot rely on client side validation alone.
However, server side engines such as ASP and JSP are quite happy
running javascript, which makes me think that I should be able to
refactore the validation library to seperate the validation rules
from the 'behaviour' rules, and use the same library client and
server side.

I have no exact design yet, but I am thinking of something along the
lines of :

<ServerSide>
validator.addField("field1","clientField1", ZIP_CODE)
...
//generate clientside script block
validator.getclientscriptFor("field1");
....

on_post()
{
validator.validate("field1", query.getField("clientField1"));
....
}
</ServerSide>

Very poor example, but the gist of it is :
1) define all validation rules in the server script.
2) generate the client side validation code out of the validation
rules, instead of re-coding them.
3) run validation on server side as well.

Now, I'd love to know if any of you can see a big flaw in what I am
attempting, or if you have any usefull idea I could follow?
Once I am done, if I am any succesfull, I'll feed back my code to
this site.

Regards





Wed Apr 16, 2003 11:03 am

franck_schmi...
Offline Offline
Send Email Send Email

Forward
Message #289 of 427 |
Expand Messages Author Sort by Date

Dear all, first of all, thank you very much for this library, I have learnt more javascript from it than from any book. I have been using a customized version...
franck_schmidlin
franck_schmi...
Offline Send Email
Apr 16, 2003
11:04 am

Hi i already did that, in fact you just have to make a definition file in a js file, and create a new validation script for work on the server side. Good luck...
fredericnaslis
Offline Send Email
Apr 16, 2003
4:52 pm

I like the sound of that. Not sure by what you mean about "have to make a definition file in a js file, and create a new validation script" tho... any chance...
Schmidlin Franck, Home
franck_schmi...
Offline Send Email
Apr 17, 2003
7:13 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help