Hi there,
I've been staring at an issue for some hours now.
PHP Code:
# Load dependencies
$validation = \Config\Services::validation();
$request = \Config\Services::request();
# Set filter rules
$validation->setRule('inv_firmname', 'Bedrijfsnaam', 'required');
# Validate the form
if ($validation->run() == false)
{
print_r($validation->getErrors());
print_r($request->getPost());
# Set validation errors
setNotification($validation->listErrors(), "error");
}
The form seems to work just fine and the data is easily accessible with getPost(). So the form was submitted correctly and the field was filled in too.
However, the Validator keeps telling me that the field is required.
So it's returning both the Errors and the $_POST data. But the Validator says there's no data.
Is this a known issue?
Any ideas or suggestions here are really appreciated.