Have you looked at this validation plugin? http://bassistance.de/jquery-plugins/jquery-plugin-validation/
Jörn On Tue, Oct 14, 2008 at 5:16 AM, Nishan Karassik <[EMAIL PROTECTED]> wrote: > > That is really slick. I like the check boxes after it validates. It > looks like you are very well versed in jQuery. This is my first > script, but I haven't had time to test it yet. It took me two days > (well evenings) to research the right strategy to get that far. I am > hoping to submit the form for server-side validation, this way I can > use this for any form validation, I just have to change the server > side validation response. From the server-side validation, I am > hoping to send a JSON array then dynamically update the corresponding > div with the key name to the key value. Will the following update the > div with the id name of variable err_id with the value contained by > err_message? $(err_id).val() = err_message; In the past I've wrote > my own JS like the following: > document.getElementById('err_provcode').innerHTML = err_provcode; > > I also work in the Health Care industry on the billing side. I need > to do multiple validations combining different dependencies based on > database queries for Medical Coding Data Entry on the front-end. > > Thanks, > Nishan > > On Oct 13, 11:43 am, Kevin Scholl <[EMAIL PROTECTED]> wrote: >> I've done something similar to this, where validation is may be run at >> either field level or on form submit, or both (default is both, can be >> overridden by invocation setting, below). >> >> http://beta.ksscholl.com/jquery/formvalidate.html >> >> Routine is invoked by the following snippet in the HEAD of the >> document: >> >> $("#myFormSample").jqValidate({ >> // validateAt : "both", // "blur" | "submit" | "both" >> passMin : 6 >> }); >> >> The validation script itself is the bottom half of the following: >> >> http://beta.ksscholl.com/jquery/js/jqforms.js >> >> and checks that required fields have data, as well as various >> specialized fields have proper formatting and such. I'm quite sure >> that it could be cleaned up considerably by anyone more versed than >> myself in the intricacies of jQuery, but I'm pretty pleased thus far. >> >> Kevin >> >> On Oct 13, 10:45 am, Nishan Karassik <[EMAIL PROTECTED]> wrote: >> >> > Wouldn't the $("#my-form [EMAIL PROTECTED]'input']").blur(function() { be >> > my trigger? >> >> > I would like to validate as the user tabs through the form. How would >> > I not run the function if the field just tabbed from is blank? >> >> > Thanks for your validation of my script. >> >> > Nishan >> >> > On Oct 13, 7:30 am, "Jörn Zaefferer" <[EMAIL PROTECTED]> >> > wrote: >> >> > > Validation should always hook into the submit event, eg. >> > > $(#myform").submit(function() { ... }); >> > > That handles both clicking the submit button as well as hitting enter >> > > while an input field has focus. >> >> > > Apart from that, the form plugin handles submitting forms via ajax and >> > > handling the response quite well, including file >> > > uploads:http://malsup.com/jquery/form/ >> >> > > Jörn >> >> > > On Mon, Oct 13, 2008 at 5:57 AM, Nishan Karassik <[EMAIL PROTECTED]> >> > > wrote: >> >> > > > Hello, >> >> > > > I have never written a Jquery script, but have, over the last few >> > > > days, compiled the following, but was hoping someone could look over >> > > > this to see if I had problems. >> >> > > > $(document).ready(function () { >> > > > $("#my-form [EMAIL PROTECTED]'input']").blur(function() { >> > > > var queryString = $.("#my-form").formSerialize(); >> > > > $.post("/path/to/your/validation.php", queryString, >> > > > function(validation_errors) { >> > > > // do something like changing a css class, >> > > > disable submit... >> > > > $.each(validation_errors, function(err_id, >> > > > err_message) { >> > > > $(err_id).val() = err_message; >> > > > } >> > > > )}; >> > > > }); >> > > > )}); >> >> > > > Thanks, >> > > > Nishan