On Thu, Jun 25, 2009 at 2:39 AM, vin.flex<[email protected]> wrote:
> can anybody help me with regexp for password with following specifications
>
> 1) It should contain atleast 8 characters
> 2) It should atleast has one uppercase letter and one digit
> 3) No special characters

        if (s.search(/^[A-Za-z0-9]{8,}$/) == -1
                || s.search(/[A-Z]/) == -1
                || s.search(/[0-9]/) == -1)
            throw new Error("Invalid password!");

Manish

Reply via email to