OEModule\OphCoCvi\models\OphCoCvi_ClericalInfo_PatientFactor::rules PHP Method

rules() public method

public rules ( ) : array
return array validation rules for model attributes.
    public function rules()
    {
        return array(array('name', 'safe'), array('name', 'required'), array('name, comments_label', 'length', 'max' => 255), array('code', 'length', 'max' => 20), array('comments_label', 'RequiredIfFieldValidator', 'field' => 'require_comments', 'value' => 1, 'message' => 'A comments label is required if comments are allowed for a factor.'), array('id, name', 'safe', 'on' => 'search'));
    }