http://docs.jquery.com/Plugins/Validation/Methods/digits
Jörn
On Thu, May 28, 2009 at 4:03 PM, VaN <fanel.dev@gmail.com> wrote:
>
> Hi,
>
> I'm trying to make my password field regex-valid, but don't know what
> to add.
>
> Here is my code :
>
> $.validator.addMethod("integer", function(value, element) {
> return !jQuery.validator.methods.required(value, element) || /^\d+$/
> i.test(value);
> }
> , "Numbers only please");
>
> $("#register_form").validate({
>
> rules: {
>
> user_password: {
> minlength: 6,
> integer:true
> },
> }
>
> });
>
> But this does not work. Did I make something wrong ?
>
No comments:
Post a Comment