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): add date rule #18

Merged
merged 2 commits into from
Aug 22, 2017
Merged

feat(rule): add date rule #18

merged 2 commits into from
Aug 22, 2017

Conversation

Flixow
Copy link
Contributor

@Flixow Flixow commented Aug 22, 2017

No description provided.

@codecov-io
Copy link

Codecov Report

Merging #18 into devel will increase coverage by 0.32%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##            devel      #18      +/-   ##
==========================================
+ Coverage   94.23%   94.56%   +0.32%     
==========================================
  Files           5        5              
  Lines         538      570      +32     
==========================================
+ Hits          507      539      +32     
  Misses         31       31

1 similar comment
@codecov-io
Copy link

Codecov Report

Merging #18 into devel will increase coverage by 0.32%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##            devel      #18      +/-   ##
==========================================
+ Coverage   94.23%   94.56%   +0.32%     
==========================================
  Files           5        5              
  Lines         538      570      +32     
==========================================
+ Hits          507      539      +32     
  Misses         31       31

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

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

export function validateDate(attribute, value) {
if (is.date(value)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't return is.date(value) enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not for timestamp which is number and formatted date e.g. 08.25.2017

@Flixow Flixow merged commit eae232c into devel Aug 22, 2017
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.

None yet

3 participants