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

Error in email validation with internationalized domain name and national alphabets #3814

Closed
Quazer opened this issue Mar 11, 2016 · 2 comments
Milestone

Comments

@Quazer
Copy link

Quazer commented Mar 11, 2016

We can use national symbols in email (internationalized domain name via ICAAN). Email validations of forms fields is wrong. Example: http://jsfiddle.net/Quazer/axLgoy8v/2/.

Wrong code in src\definitions\behaviors\form.js

regExp: {
...
    email   : "[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",
...
  },

For check the validity of the Russian-language addresses I use the following crutch:

<script type="text/javascript">
    $.fn.form.settings.regExp.email = "[a-z0-9а-я!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9а-я!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9а-я](?:[a-z0-9а-я-]*[a-z0-9а-я])?\\.)+[a-z0-9а-я](?:[a-z0-9а-я-]*[a-z0-9а-я])?";
</script>

I propose to make the correction.

@jlukic jlukic added this to the 2.1.9 milestone Mar 11, 2016
@avalanche1
Copy link
Member

I would propose to do the following: /.+@.+\..+/i
https://davidcel.is/posts/stop-validating-email-addresses-with-regex/

@jlukic jlukic modified the milestones: 2.1.9, 2.2 May 4, 2016
@jlukic
Copy link
Member

jlukic commented May 15, 2016

Fixed in #3955 with a reasonable email RegExp from @kevinresol. If there's any that don't pass that filter feel free to ping me.

@jlukic jlukic closed this as completed May 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants