Put the code below in your controller and replace the model name with the appropriate model name against which to check.
$errors = $this->ModelName->invalidFields();
The above code will return a array containing the validation rules that failed.
To read more about validating data in cakePHP click here
Image Credits: Photo by Isis França on Unsplash.