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

Add option allowNonTld for email format validator #330

Merged
merged 4 commits into from
Aug 29, 2016

Conversation

indr
Copy link
Contributor

@indr indr commented Aug 27, 2016

Resolves #329.

Tasks:

  • Added test case(s)
  • Updated documentation

@@ -76,7 +79,12 @@ export default Base.extend({
const { regex, type } = options;

if (type && !isNone(regularExpressions[type]) && isNone(regex)) {
options.regex = regularExpressions[type];
if (type === 'email' && options.allowNonTld) {
options.regex = regularExpressions['emailNonTld'];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As emailNonTld is a literal string, please replace it with options.regex = regularExpressions.emailNonTld

@offirgolan
Copy link
Collaborator

@indr thank you for taking the time in putting this PR together! This is fantastic 😸. I've added a couple styling comments. Once those are resolved I'll go ahead and merge this PR.

@indr
Copy link
Contributor Author

indr commented Aug 28, 2016

Wow, this is amazing, I just pushed and the PR gets updated 😄

@offirgolan My pleasure. Thanks for your comments. Will adapt this style for my projects.

@offirgolan
Copy link
Collaborator

@indr looks great! Thanks again for your contribution. Ill make sure to note this as well as the earlier regression in the next release.

@offirgolan offirgolan merged commit 4949ee3 into adopted-ember-addons:master Aug 29, 2016
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.

2 participants