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

feat(rule): email #17

Merged
merged 2 commits into from
Aug 22, 2017
Merged

feat(rule): email #17

merged 2 commits into from
Aug 22, 2017

Conversation

Flixow
Copy link
Contributor

@Flixow Flixow commented Aug 22, 2017

No description provided.

@Flixow Flixow requested a review from Idered August 22, 2017 11:15
@codecov-io
Copy link

Codecov Report

Merging #17 into devel will increase coverage by 0.24%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##            devel      #17      +/-   ##
==========================================
+ Coverage   94.23%   94.48%   +0.24%     
==========================================
  Files           5        5              
  Lines         538      562      +24     
==========================================
+ Hits          507      531      +24     
  Misses         31       31

1 similar comment
@codecov-io
Copy link

Codecov Report

Merging #17 into devel will increase coverage by 0.24%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##            devel      #17      +/-   ##
==========================================
+ Coverage   94.23%   94.48%   +0.24%     
==========================================
  Files           5        5              
  Lines         538      562      +24     
==========================================
+ Hits          507      531      +24     
  Misses         31       31

@@ -106,3 +106,11 @@ export function validateRegex(attribute, value, parameters) {

return regex ? regex.test(value) : true
}

export function validateEmail(attribute, value) {
if (is.not.string(value) && is.not.number(value)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

return is.email(value) should be enough, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, for example ['daniel@ss.com'] passes even if array is not a valid email

@Flixow Flixow changed the title feat(rule): add email rule feat(rule): email Aug 22, 2017
…into validator#Email

# Conflicts:
#	src/messages.js
#	src/validators.js
@codecov-io
Copy link

Codecov Report

Merging #17 into devel will decrease coverage by 0.07%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##            devel      #17      +/-   ##
==========================================
- Coverage   94.56%   94.48%   -0.08%     
==========================================
  Files           5        5              
  Lines         570      562       -8     
==========================================
- Hits          539      531       -8     
  Misses         31       31

@codecov-io
Copy link

Codecov Report

Merging #17 into devel will increase coverage by 0.21%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##            devel      #17      +/-   ##
==========================================
+ Coverage   94.56%   94.78%   +0.21%     
==========================================
  Files           5        5              
  Lines         570      594      +24     
==========================================
+ Hits          539      563      +24     
  Misses         31       31

@Flixow Flixow merged commit 76f931e into devel Aug 22, 2017
@Flixow Flixow deleted the validator#Email branch August 22, 2017 16:57
@codecov-io
Copy link

Codecov Report

Merging #17 into devel will increase coverage by 0.21%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##            devel      #17      +/-   ##
==========================================
+ Coverage   94.56%   94.78%   +0.21%     
==========================================
  Files           5        5              
  Lines         570      594      +24     
==========================================
+ Hits          539      563      +24     
  Misses         31       31

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.

3 participants