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

Fix #435: Convert returned comparison in isBefore() to a boolean. #436

Merged
merged 1 commit into from
Sep 18, 2015

Conversation

rustybailey
Copy link
Contributor

Fixed a bug where isBefore() returns null if either of the arguments are invalid dates.

Turns out that isAfter() was already returning a boolean, so I just emulated that return style. Also added a few tests to show that invalid dates will return false in isAfter() and isBefore().

@chriso
Copy link
Collaborator

chriso commented Sep 18, 2015

Awesome, thanks!

chriso added a commit that referenced this pull request Sep 18, 2015
Fix #435: Convert returned comparison in isBefore() to a boolean.
@chriso chriso merged commit 3393c54 into validatorjs:master Sep 18, 2015
@chriso
Copy link
Collaborator

chriso commented Sep 18, 2015

Just published the fix in 4.0.6.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.01% when pulling 04d8b45 on rustybailey:fix_isBefore into b20a8db on chriso:master.

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