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.
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.