echo buildrules errors in cakephp 3.2

125 views Asked by At

I am trying to save the data but in error() it is not showing anything but still save() method returns false. After some research i figure out it is due to failure of buildRule

 public function buildRules(RulesChecker $rules)
{
    //$rules->add($rules->isUnique(['email']));
    $rules->add($rules->existsIn(['religion_id'], 'MsReligions'));
     $rules->add($rules->existsIn(['applicant_permanent_state_id']));
    return $rules;
}

Did anyone know how to view buildrules error in cakephp 3.2 error() method is only showing validations error.

0

There are 0 answers