The "digits" method does just that:
http://docs.jquery.com/Plugins/Validation/Methods/digits

Jörn

On Thu, May 28, 2009 at 4:03 PM, VaN <fanel....@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 ?
>

Reply via email to