我正在使用jQuery Validation(PLUGIN URL)插件进行大部分表单验证:
我有以下示例(LIVE EXAMPLE):
形成:
Feedback-form" method="post" action="#"> required"> jQuery的: @H_301_9@$("#Feedback-form").validate({ rules: { phone: { number: true,// as space is not a number it will return an error minlength: 6,// will count space maxlength: 9 } } }); 我有两个问题,都与空间使用有关. > min&最大长度将空格计为字符>如果number = true且使用了空格,则它将返回错误,因为空格不是数字 这有什么解决方法吗?有没有人遇到过同样的问题?请注意我想继续允许输入空格(为了便于阅读).
jQuery的:
$("#Feedback-form").validate({ rules: { phone: { number: true,// as space is not a number it will return an error minlength: 6,// will count space maxlength: 9 } } });
我有两个问题,都与空间使用有关.
> min&最大长度将空格计为字符>如果number = true且使用了空格,则它将返回错误,因为空格不是数字
这有什么解决方法吗?有没有人遇到过同样的问题?请注意我想继续允许输入空格(为了便于阅读).