Skip to content

Commit

Permalink
Additional stuff for #566
Browse files Browse the repository at this point in the history
  • Loading branch information
chriso committed Sep 1, 2016
1 parent 7eaad70 commit be79bea
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

- Added an `isMD5()` validator
([#557](https://github.com/chriso/validator.js/pull/557))
- Fixed an exceptional case in `isDate()`
([#566](https://github.com/chriso/validator.js/pull/566))
- New locales
([#559](https://github.com/chriso/validator.js/pull/559),
[#568](https://github.com/chriso/validator.js/pull/568),
Expand Down
2 changes: 1 addition & 1 deletion lib/isDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,4 @@ function isDate(str) {
}
return false;
}
module.exports = exports['default'];
module.exports = exports['default'];
2 changes: 1 addition & 1 deletion src/lib/isDate.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function isDate(str) {
// check for valid double digits that could be late days
// check for all matches since a string like '12/23' is a valid date
// ignore everything with nearby colons
dayOrYearMatches = str.match(/(^|[^:\d])[23]\d([^:\d]|$)/g);
dayOrYearMatches = str.match(/(^|[^:\d])[23]\d([^T:\d]|$)/g);
if (!dayOrYearMatches) {
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@
// check for valid double digits that could be late days
// check for all matches since a string like '12/23' is a valid date
// ignore everything with nearby colons
dayOrYearMatches = str.match(/(^|[^:\d])[23]\d([^:\d]|$)/g);
dayOrYearMatches = str.match(/(^|[^:\d])[23]\d([^T:\d]|$)/g);
if (!dayOrYearMatches) {
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion validator.min.js

Large diffs are not rendered by default.

0 comments on commit be79bea

Please sign in to comment.