Hi guys, I'm developing a form with client side validation using jQuery validation plugin.
This almost works perfect but i'm getting a problem:
The form is composed by 5 inputs. One input requires the content of other input(that must be valid) to proceed the validation, i show one example:
$('#submitionData').validate(
{
rules: {
tb_valorEmprestimo:
{
required: true,
min: 1000,
max: 999999999,
checkForTranche: true
...
jQuery.validator.addMethod("checkForTranche", function()
{
return $('#tb_tranche').valid() == 1 ? true : false
}
, "Please Correct Tranche field");
Where #tb_tranche is the control i need to validate first, but one problem ocurrors, When the tb_tranche is valid the text saying ...Please Correct Tranche field continues appeearing in the tb_valorEmprestimo input..
Apreciate help guys, thanks