Skip to content

fix: 修正日期校验器 #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

fix: 修正日期校验器 #18

wants to merge 1 commit into from

Conversation

xiaobitipao
Copy link

fix: 日期校验器不能校验非法日期: 2020/05/35

@colorful3 colorful3 requested a review from juzi214032 August 25, 2020 08:17
Copy link
Member

@juzi214032 juzi214032 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

您好,感谢提交 PR。DateTimeFormatValidator注解用于校验日期格式是否正确,并不保证日期是否是正确的。我试了DateTimeFormatter可以保证简单的日期是否正确(如每月最大为 31 日,每天最大为 24 时等),但仍然无法判断出大小月正确性,所以这里修改为DateTimeFormatter意义并不大。我们会考虑是否再提供一个校验日期正确性的注解。

@juzi214032 juzi214032 closed this Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants