开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜