posabsolute/jQuery-Validation-Engine — Issue #229: Inputs with empty value and custom validation can never display error message
Author: markstahler
Created: 2011-12-20 20:26:43+00:00
State: open

I have some fairly complicated validations for my form. One being that if an input is empty, the partner input cannot and vice versa. The issue I have run into is when one of the inputs is filled in and the other forgotten, no error is displayed on the empty input and validation continues (despite my custom validation sending an AlertText).

This line is buggering it up for me:

// If the rules required is not added, an empty field is not validated
if(!required && field.val() == "") options.isError = false;

Can you think of a way around this? I really prefer to have the validation message on the empty form input.