I ve placed a small validation in a javascript function . Now i need to call jquery validation from javascript function .. how can i call the jquery validation from javascript ???
2 Answers
From the jquery tutorial site
you can do:
$("input[type='text']").change( function() {
// check input ($(this).val()) for validity here
});
if you want to validate text inputs
1 Comment
user695663
I am using Labelify and Validate plugins of JQuery. Error messages displayed for invalid data are Title field of text boxes. I want to use the custom messages? while not affecting the title message
You need to call the form() method of the validation plugin
var valid = $('form').validate().form()
3 Comments
Dhamodaran R
function clickFunc() {for ( var i = 1; i <= divLength; i++) { var productGroupId = document.getElementById("productGroupId"+i+"").value; if(productGroupId ==1){ document.getElementById('message').innerHTML = "Please select Product Group"; return false; } } // this s a function. hw can i call jquery validation from this ..
m0sa
and why call an additional jquery validation function if you already have your own validation?? The normal way would be to write a jquery validation validator (e.g. you function) and then invoke the validation of the entire form the jquery validation plugin.
Dhamodaran R
actually i ve invoked a value 1 for the function so jquery wont validate t .. but for the remaininig column i ve jquery validation...