You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to be duplicated with #2427 and fixed by #2443 .
I was able to reproduce the problem on 13.12.0, but it does not occur in the latest dev version.
Describe the bug
I am using the isDate function of validator and when I use it on string of exactly size 4, it crashes.
Examples
Code line:
validator.isDate('test')
error code:
at Object.isDate (path-to-y-project\backend\node_modules\validator\lib\isDate.js:86:19)
Additional context
Validator.js version:
"node_modules/validator": {
"version": "13.12.0",
"resolved": "https://registry.npmjs.org/validator/-/validator-13.12.0.tgz",
"integrity": "sha512-****",
"license": "MIT",
"engines": {
"node": ">= 0.10"
}
},
Node.js version: Node.js v20.18.0
OS platform: windows
My current fix
.
.
.
dateObj[formatWord.charAt(0)] = dateWord;
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
if (dateObj.y == null || dateObj.m == null || dateObj.d == null){
console.log("Modified by me");
return false;
}
var fullYear = dateObj.y;
.
.
.
I have just brute force the fix and it is probably terrible :)
The text was updated successfully, but these errors were encountered: