Welcome Guest, Not a member yet? Register   Sign In
Possible change POST before validation?
#1

(This post was last modified: 11-26-2022, 10:49 AM by motoroller.)

Possible change data POST before validation?
I did change in POST, after that make validaion but it comes with old data

Or how can i pass new Data to validation?


$validation->withRequest($_POST)->run();

I got Error
CodeIgniter\Validation\Validation::withRequest(): Argument #1 ($request) must be of type CodeIgniter\HTTP\RequestInterface, array given
Reply
#2

I recommend you use $this->validateData() in Controller.
See https://codeigniter4.github.io/CodeIgnit...lidatedata
Reply
#3

The same as $this->validate().
See https://codeigniter4.github.io/CodeIgnit...s-validate
Reply




Theme © iAndrew 2016 - Forum software by © MyBB