validatorjs/validator.js

isISO8601 returns true for an invalid iso8601 date

Open

#2,003 创建于 2022年7月18日

在 GitHub 查看
 (16 评论) (1 反应) (1 负责人)JavaScript (2,253 fork)batch import
good first issue🐛 bug

仓库指标

Star
 (22,497 star)
PR 合并指标
 (平均合并 10小时 14分钟) (30 天内合并 2 个 PR)

描述

Describe the bug When using isISO8601 to check date that looks like iso8601 format, but missing seconds, will return true even though it is an invalid date

Examples Date string such as "2018-09-11T10:16.000Z" will return true. Live sample: https://codesandbox.io/s/wandering-fire-qr6fm6?file=/src/index.js

Additional context Validator.js version: 13.7.0 Node.js version: 16 OS platform: macOS

贡献者指南