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: improve validation.rst #5233

Merged
merged 3 commits into from Oct 25, 2021
Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Oct 22, 2021

Description
The Validation library docs is misleading, especially in the context that CI 3 validation used to alter data.
See https://forum.codeigniter.com/thread-75543.html

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

Validation library does not trim the data unlike CI3's.
Generally, HTML encoding should be done in Views.
When using native functions, it needs one or three params.
$rule($value) or $rule($value, $param, $data).
It seems there is no function to fit the API.

CI3's validation alters data. CI4 does not.
@kenjis kenjis merged commit fe5037d into codeigniter4:develop Oct 25, 2021
@kenjis kenjis deleted the fix-docs-validation branch October 25, 2021 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants