05-16-2020, 07:16 AM
Hello,
Having a small problem. I'm trying to build an API and when I setup the "protected $validationRules" I get the following error:
{
"status": 500,
"error": 500,
"messages": {
"error": "Internal Server Error"
}
}
The code is:
In postman I'm using an incorect email format. Same thing happens also if I don't put "first_name".
So my issue it's not that I'm getting an error, that's what I'm looking to get ... but I'm looking to get "Invalid Email address" ... not "Internal Server Error"
If anyone can help ... would be much appreciated.
Having a small problem. I'm trying to build an API and when I setup the "protected $validationRules" I get the following error:
{
"status": 500,
"error": 500,
"messages": {
"error": "Internal Server Error"
}
}
The code is:
PHP Code:
protected $validationRules = [
'email' => 'required|valid_email',
'first_name' => 'required'
];
In postman I'm using an incorect email format. Same thing happens also if I don't put "first_name".
So my issue it's not that I'm getting an error, that's what I'm looking to get ... but I'm looking to get "Invalid Email address" ... not "Internal Server Error"
If anyone can help ... would be much appreciated.