Skip to content

feat: add validation for weekends #1377

New issue

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

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

Already on GitHub? # to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

putrafajarh
Copy link

Fixes Or Enhances

Added new validation rules weekend

Make sure that you've checked the boxes below before you submit PR:

  • Tests exist or have been written that cover this particular change.

@go-playground/validator-maintainers

@putrafajarh putrafajarh marked this pull request as ready for review February 17, 2025 00:20
@putrafajarh putrafajarh requested a review from a team as a code owner February 17, 2025 00:20
@coveralls
Copy link

Coverage Status

coverage: 74.368% (+0.02%) from 74.348%
when pulling ab2e357 on putrafajarh:master
into 0240917 on go-playground:master.

@putrafajarh
Copy link
Author

putrafajarh commented Feb 17, 2025

Just want to know, if my PR approve, is it better to add another rule weekday ?
@deankarn @nodivbyzero

@nodivbyzero
Copy link
Contributor

Thanks for your contribution!

Interesting idea, but the implementation seems limited to a specific date format.
Would it still work if the date format is 'January 25, 2025 15:04' or 'Jan 25, 2025'?

@putrafajarh
Copy link
Author

@nodivbyzero it utilize time.Parse, it should work.

The problem is according to doc, need to put 0x2C to represent comma

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants