• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
validationRules returns Internal Server Error in CI4


Having a small problem. I'm trying to build an API and when I setup the "protected $validationRules" I get the following error: 
    "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. 

Solved it ... obvious my mistake I was showing the error from $this instead of $model->errors()

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.