Validating an e-mail field based on a specific domain

Posted by mmsa on Stack Overflow See other posts from Stack Overflow or by mmsa
Published on 2010-04-13T16:09:24Z Indexed on 2010/04/13 16:13 UTC
Read the original article Hit count: 143

Filed under:

I have a site that will require a login by the users. The client will only only users from their company's domain to gain access. I need to validate the field based on an e-mail domain address. ie. only allow email addresses from @mycompany.com to go through.

Can this be done with the jquery.validate plugin? I see where you can check to see if it's a valid e-mail, but I'd like to make sure it matches a specific pattern (@mycompany.com).

Any help would be appreciated!

© Stack Overflow or respective owner

Related posts about jQuery