You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"status": 400,
"error": 400,
"messages": {
"first_name": "The first_name field may only contain alphabetical characters.",
"last_name": "The last_name field may only contain alphabetical characters.",
"account_type": "The account_type field must be one of: checking,savings.",
"signature_date": "The signature_date field must contain a valid date."
}
}
paulbalandan
added
documentation
Pull requests for documentation only
and removed
bug
Verified issues on the current code behavior or pull requests that will fix them
labels
Apr 4, 2021
The documentation for return $this->failValidationError($validation->getErrors()); shows this line is working in the documentation but in reality, I keep getting a 500 error. I am trying to build some validation for my REST API.
But if I pass the following manually then the list of validation errors returns successfully:
CodeIgniter 4 version
4.1.1
Affected module(s)
trait ResponseTrait
Expected behavior, and steps to reproduce if appropriate
Create a POST method in a controller like this and it will fail with 500:
but change the last line to this:
and you successfully get back:
Context
Docker Image:
webdevops/php-apache-dev:7.4
The text was updated successfully, but these errors were encountered: