jquery-validate

JQuery Validating text field depending on select box

I'm trying to validate a input field with the JQuery validation plugin. The numeric range [range()] depends on the value of a select box. For example when the select box is "A" the range should be between 1 and 10. But when its "B" it should be between 5 and 10 and so on. I did try this with reading out the value of of the select box and...

How to exempt element to be validated?

Hi, I'm using the validation plugin for jquery: http://docs.jquery.com/Plugins/Validation. I want to know how would I exempt a field to be validated? Currently all fields inside the form are automatically checked. ...

Jquey ajax call not working in FF and safari works in IE

I made a little module to use a jquery/ajax script on my website. For that I used examples which are on the site and others. The script is working in IE (for a change it works there) but I cannot get it working in FF or safari. Tried a lot of things but somehow it never executes the updatecounter function I am not a javascript programme...

Validate Jeditable field

I'm using Jeditable (posting to CakePHP) for input on my page. I want users to only fill in numbers in the Jeditable fields, so my idea was to also use the jQuery validation plugin to validate if only numbers are used, I already use this in other parts of my site. Jeditable dynamically creates a form with an input when you click on the ...

Using $.get with jquery validation

I'm trying to use the Jquery builtin validator on my page. The issue is that I have certain fields that only are required if the JobID (entered into another field) does not already exist in our database. I have a simple service which simply takes JobID and returns True or False based on whether the JobID exists, but I can't seem to get...

jQuery Validation - Highlighting Radio Labels

I'm trying to use jQuery validation to highlight the labels for my radio buttons only, and not the labels for my other inputs. I have a label for my radio button set called 'type'. I can't seem to get it to work! $(document).ready(function(){ $("#healthForm").validate({ highlight: function(element, errorClass) { $(element)....

jQuery Validation Plugin: Validating Checkboxes with Different Names

I have a set of 4 checkboxes, all with different names, and require that at least 1 is checked. I have set the class on all of them to 'require-one'. <html> <head> <script src="scripts/lib/jquery.js" type="text/javascript"></script> <script src="scripts/jquery.validate.js" type="text/javascript"></script> <script language="JavaScr...

JQuery remote Validation only after form submission

Instead of verifying the value after each change, I would like my remote call to be invoked only after form submission.. Is this possible? <input type="text" remote="validate_url.php" > ...

JQuery validate: how to place error messages inside the input's title attribute

Due to space limitations I'm trying to place the error messages for a form inside tooltips. $("form").validate({ rules: { username: { required: true, email: true }, password: "required" }, onkeyup: true, success: "valid", errorPlacement: function(error, element) { ...

jQuery validation: change default error message

Is there a simple way to change the default error values in the jQuery validation plugin? I just want to rewrite the error messages to be more personal to my app--I have a lot of fields, so I don't want to set the message individually for field x...I know I can do that! Thanks! ...

Combining the jquery Calendar picker with the jquery validation and getting them to play nice?

I'm just starting to get into jquery/javascript programming so this may be a beginner question but I sure can't seem to find anything about it. I have a text field on a form. I've used the JQuery UI Calendar picker to make data entry better. I've also added jquery validation to ensure that if the user enters the date by hand that it's s...

JQueryValidation - Input error class name

Is there a way with the JQueryValidation plugin to set the input css class error. This css class is different from the label css error class. Because if I set : errorClass: "field-validation-error" That will apply for label and input. I would like input to have "input-validation-error" css class and label to have "field-validation-erro...

jquery validate - validating a field on pageload

Hi there, I've got an input field on my plain html form that I would like to be marked as invalid (and the error message shown) from the moment the page loads. Is this possible to do with the jquery validate plugin? Failing that, how can I hide an element when the plugin tries to validate a particular input field? ...

jQuery addClass on $.post

I am basically trying to create a small registration form. If the username is already taken, I want to add the 'red' class, if not then 'green'. The PHP here works fine, and returns either a "YES" or "NO" to determine whether it's ok. The CSS: input { border:1px solid #ccc; } .red { border:1px solid #c00; } .green { border:1px s...

jQuery validate plugin : accept letters only?

I'm using the validate plugin from http://bassistance.de/jquery-plugins/jquery-plugin-validation/ What i'm trying to find is a way to make some of my form fields accept letters only, no numbers, special chars etc... Any idea people ? Thanks a lot. ...

adding jquery validation after form created

I'm using a jquery validation plugin First I add the validation to the form: $('#EmployeeForm').validate({ rules: { "Employee.FirstName": "required", "Employee.PatronymicName": "required", "Employee.LastName": "required", "Employee.BirthDay": { required: true, date: true } ...

jQuery Validation, multiple form ids for same function

Hi have two forms with the exact same validation rules, but different ids that I'd like to combine into just one function. How can I do that? var validator = $("#ValidateForm1").validate({ errorPlacement: function(error, element) { if ( element.is(":radio") ) error.appendTo( element.parent().next().next() ); else if ( e...

jQuery plugin validate() : apply plugin to ajax injected form

My issue here is quite simple : i'm trying to use the jQuery validate plugin to a form that gets injected after certain user actions. My problem mostly is that : I could use live support to bind the change event over inputs, like this $("#adresseLivraisonPro").live('change',function(e){ $("#adresseLivraisonPro").validate({ ...

Current object value in jquery

All, in the below code How to edit the current added value.i.e, in the edit function how to get the value in td .Also how can we check for duplicates. <script type="text/javascript"> function edit(obj) { // var ele= obj.parentNode ; alert(obj.innerHTML); var htm = '<textarea name="modal" id="modal" rows="10" ...

setting a value through jquery

<script> function edit(elem) { var ele=$(elem).siblings('label#test').html(); var a=document.getElementById('test'); var htm = '<input type="text" name="modal" id="modal" style="width:70%;" value="'+$(elem).siblings('label#test').html();+'"/>'; $dialog.html(htm) .dialog({ autoOpen: true, position: 'center' , ...