diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c31d75d3..a947a1c8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +#### HEAD + +- Added an `isMD5()` validator + ([#557](https://github.com/chriso/validator.js/pull/557)) + #### 5.5.0 - Fixed a regex denial of service in `trim()` and `rtrim()` diff --git a/lib/isMD5.js b/lib/isMD5.js index 3e8d9982f..6de9d17fc 100644 --- a/lib/isMD5.js +++ b/lib/isMD5.js @@ -11,9 +11,7 @@ var _assertString2 = _interopRequireDefault(_assertString); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -/* eslint-disable no-control-regex */ var md5 = /^[a-f0-9]{32}$/; -/* eslint-enable no-control-regex */ function isMD5(str) { (0, _assertString2.default)(str); diff --git a/validator.js b/validator.js index 1d043cd9c..5dc663c84 100644 --- a/validator.js +++ b/validator.js @@ -563,9 +563,7 @@ return hexcolor.test(str); } - /* eslint-disable no-control-regex */ var md5 = /^[a-f0-9]{32}$/; - /* eslint-enable no-control-regex */ function isMD5(str) { assertString(str);