PHP Version
8.2
CodeIgniter4 Version
4.4.8
CodeIgniter4 Installation Method
Composer (using codeigniter4/appstarter)
Which operating systems have you tested for this bug?
Linux
Which server did you use?
apache
Database
No response
What happened?
Ok so based on the official CodeIgniter 4's documentation, the if_exist validation rule is supposed to prevent further validation when the field is not present in the data to validate.
However, I noticed that when sending an array it causes the if_exist to misbehave.
Steps to Reproduce
To reproduce you can use this bit of code:
$validation_rules = [
'foo' => [
'rules' => 'if_exist|in_list',
'errors' => [
'in_list' => 'invalid_parameter'
]
]
];
$this->validate($validation_rules);
and send something like this in the payload (This is from Postman's Body using form-data):
Expected Output
The validate() function should return false
Anything else?
No response
PHP Version
8.2
CodeIgniter4 Version
4.4.8
CodeIgniter4 Installation Method
Composer (using
codeigniter4/appstarter)Which operating systems have you tested for this bug?
Linux
Which server did you use?
apache
Database
No response
What happened?
Ok so based on the official CodeIgniter 4's documentation, the
if_existvalidation rule is supposed to prevent further validation when the field is not present in the data to validate.However, I noticed that when sending an array it causes the
if_existto misbehave.Steps to Reproduce
To reproduce you can use this bit of code:
and send something like this in the payload (This is from Postman's Body using form-data):
Expected Output
The
validate()function should returnfalseAnything else?
No response