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

docs: add warning to validate() in controller #8169

Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Nov 7, 2023

Description
Supersedes #8157

validate() has many pitfalls and is not recommended.

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 documentation Pull requests for documentation only label Nov 7, 2023
@kenjis kenjis force-pushed the docs-warn-validate-in-controller branch 3 times, most recently from 78af796 to d1f3f72 Compare November 8, 2023 02:58
``validateData()``.

The method accepts an array of data to validate in the first parameter, and an
array of rules in the second parameter, and in the optional third parameter,
Copy link
Contributor

Choose a reason for hiding this comment

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

Method validateData() has 4 parameters, my understanding of this text is that it has 3 parameters.

Copy link
Member Author

Choose a reason for hiding this comment

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

You are correct!
I added.

@kenjis kenjis force-pushed the docs-warn-validate-in-controller branch from d1f3f72 to 04505c7 Compare November 9, 2023 21:29
Copy link
Contributor

@datamweb datamweb left a comment

Choose a reason for hiding this comment

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

Thanks!

@kenjis kenjis merged commit 71e1e43 into codeigniter4:develop Nov 9, 2023
7 checks passed
@kenjis kenjis deleted the docs-warn-validate-in-controller branch November 9, 2023 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Pull requests for documentation only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants