Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow + and - in non-capturing domain group #66

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Allow + and - in non-capturing domain group #66

wants to merge 1 commit into from

Conversation

arxpoetica
Copy link

These characters are common to domain names.

These characters are common to domain names.
@HenrikJoreteg
Copy link
Owner

Sorry this has been sitting for so long, i'm seeking new maintainers, let me know here if you're interested: #72

@btpoe
Copy link
Collaborator

btpoe commented Nov 1, 2015

RMC952 States:

A "name" (Net, Host, Gateway, or Domain name) is a text string up
to 24 characters drawn from the alphabet (A-Z), digits (0-9), minus
sign (-), and period (.).

I don't think a plus sign is valid in a domain. Can you find data that says otherwise? If not, can you drop the plus sign from the regex?

Thanks

@lindseybradford
Copy link

Update the regex like so:

email: function (val) {
    var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
    return re.test(val);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants