Update FormHelper.php : $this->Form->inputDefaults(array('error'=>array('class'=>'custom-class'))); was not working

Call to FormHelper::error does not comply with API specification http://book.cakephp.org/2.0/en/core-libraries/helpers/form.html#FormHelper::error