validator.js
validator.js copied to clipboard
isDate : iOS and Android return different results
Describe the bug
I'm using React Native with Expo.
I use isDate
. The function behaves differently between iOS and Android platform.
Examples
When I check isDate("2023-09-12")
it returns true
on iOS but false
on Android.
Same for other dates with -
or /
.
Additional context Validator.js version: 13.9.0 Node.js version: v16.18.1 OS platform: Android & iOS React: "18.2.0" React-native: "0.71.8" Expo version: 48.0.17
Couldn't reproduce
Looks like this might be related or a duplicate of #2256