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

fix: [Validation] exact_length does not pass int values #8088

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Oct 24, 2023

Description
From Slack

  • exact_length in traditional rules passes int values
  • but exact_length in strict rules passes only string values
  • it is not intuitive that the rule ‘required|numeric|exact_length[10] is invalid, and if you pass 1234567890, you will get the error "The XXX field must be exactly 10 characters in length."

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label Oct 24, 2023
@kenjis kenjis force-pushed the fix-validation-exact_length branch from ace97aa to 391723b Compare October 24, 2023 10:10
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

I agree, good logical change.

@kenjis kenjis merged commit f780d75 into codeigniter4:develop Oct 25, 2023
61 checks passed
@kenjis kenjis deleted the fix-validation-exact_length branch October 25, 2023 20:46
@kenjis
Copy link
Member Author

kenjis commented Oct 25, 2023

Thank you for reviews! Guys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants