[英]jquery inline validation for numbers and numbers with characters?
I have a form in that some different types of input fields like for url, letters, letters with numbers, and only for numbers
. 我有一种形式,其中有一些不同类型的输入字段,例如
url, letters, letters with numbers, and only for numbers
。 To make them inline validation I picked this jquery inline validator plugin . 为了使它们进行内联验证,我选择了这个jquery内联验证器插件 。 It is working fine for url and letters validation but I am not getting how to make validate numbers only like
(23224567445)
and both letters and numbers in mix like (A3F00)
? 对于url和字母验证,它工作正常,但是我没有得到如何仅使验证数字像
(23224567445)
以及使字母和数字混合像(A3F00)
吗? I have searched the documentation but I am not getting it properly. 我已经搜索了文档,但是没有正确找到它。 For url vaidation I have done like this
对于网址验证,我已经这样做了
Url validation
<input type="text" class="validate[required,custom[url]]" name="link_url" id="link_url"/>
letters validation
<input type="text" name="firstname" class="validate[required,custom[onlyLetterSp],maxSize[100],ajax[ajaxNameCallPhp]] text-input" id="firstname"/>
So can someone kindly tell me how to validate only numbers and numbers with alphabets as example above I have given. 因此,有人可以告诉我如何仅验证数字和带有字母的数字吗? Any help and suggestions will be really appreciable.
任何帮助和建议都是非常可取的。 Thanks
谢谢
试试这个“ custom [onlyLetterNumber]”
<input value="too many spaces obviously" class="validate[required,custom[onlyLetterNumber]]" type="text" name="special" id="special" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.