ValidationEngine - Validation is bypassed when spaces are inserted
When only spaces are entered in required field, the validation is bypassed, it assumes that data has 开发者_开发问答been entered in the field, wherein reality it is blank.
Any suggestions/solutions to this??
Thanks in advance.
jQuery has a nice function for trimming leading and trailing whitespace (API - jQuery Trim)
jQuery.trim(stringToTrim);
Will return the string without the whitespace.
Note that you can accomplish this also with regular expressions.
精彩评论