Skip to content

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

Merged
kenjis merged 2 commits intocodeigniter4:developfrom
kenjis:fix-validation-exact_length
Oct 25, 2023
Merged

fix: [Validation] exact_length does not pass int values#8088
kenjis merged 2 commits intocodeigniter4:developfrom
kenjis:fix-validation-exact_length

Conversation

@kenjis
Copy link
Copy Markdown
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
Copy Markdown
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
@kenjis kenjis deleted the fix-validation-exact_length branch October 25, 2023 20:46
@kenjis
Copy link
Copy Markdown
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