Skip to content
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

Bug: rules() "required" is generated before "*_default" #22 #24

Merged
merged 12 commits into from
Feb 20, 2025

Conversation

SOHELAHMED7
Copy link
Member

Fixes #22

@SOHELAHMED7 SOHELAHMED7 requested a review from cebe August 17, 2024 15:06
@SOHELAHMED7 SOHELAHMED7 self-assigned this Aug 17, 2024
@SOHELAHMED7 SOHELAHMED7 linked an issue Aug 17, 2024 that may be closed by this pull request
@SOHELAHMED7 SOHELAHMED7 marked this pull request as ready for review August 18, 2024 14:16
@SOHELAHMED7 SOHELAHMED7 changed the title Draft: Bug: rules() "required" is generated before "*_default" #22 Resolve: Bug: rules() "required" is generated before "*_default" #22 Aug 18, 2024
@cebe
Copy link
Member

cebe commented Nov 12, 2024

Although it seems to fix #22, putting required at the end does not sound good to me. Require check should be applied before any more specific validation.

Default and require are in conflict, so I'm not sure how to handle it correctly.

@cebe cebe added this to the 2.0.0 milestone Feb 7, 2025
@cebe cebe added the under discussion Still discussing, not ready for implementation. label Feb 7, 2025
@cebe
Copy link
Member

cebe commented Feb 19, 2025

The order of validation rules should be the following:

  1. trim rules should always be first
  2. default all default rules added here
  3. required all required rules here
  4. all other rules after these

@SOHELAHMED7 SOHELAHMED7 changed the title Resolve: Bug: rules() "required" is generated before "*_default" #22 Bug: rules() "required" is generated before "*_default" #22 Feb 19, 2025
@SOHELAHMED7 SOHELAHMED7 marked this pull request as draft February 19, 2025 09:53
@SOHELAHMED7 SOHELAHMED7 marked this pull request as ready for review February 20, 2025 10:41
@cebe cebe merged commit 910e8f5 into master Feb 20, 2025
5 checks passed
@cebe cebe deleted the 22-bug-rules-required-is-generated-before-_default branch February 20, 2025 14:51
@cebe
Copy link
Member

cebe commented Feb 20, 2025

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
under discussion Still discussing, not ready for implementation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: rules() "required" is generated before "*_default"
2 participants