jQuery-Validation-Engine icon indicating copy to clipboard operation
jQuery-Validation-Engine copied to clipboard

Little bug for Text Required Field

Open emersonbarros opened this issue 15 years ago • 1 comments

When you write only space " " inside a textbox the validation doesn't work.

I fix this changing the code bellow in _required function:

default: if (!field.val() || field.val().trim() == "") return options.allrules[rules[i]].alertText; break;

emersonbarros avatar May 05 '11 19:05 emersonbarros

Hmm only adding a space strike me as the same as only adding one letter, if you really don't want to enter a real value its not going to work

But thanks for the patch

posabsolute avatar May 05 '11 20:05 posabsolute