Add a field to the list of fields to be ignored by the check() method
public addSkipCheckField ( string $fieldName ) : void | ||
$fieldName | string | The field to add (can be a field alias) |
리턴 | void |
/** * Add the created_on and created_by fields in the fieldsSkipChecks list of the model. We expect them to be empty * so that we can fill them in through this behaviour. * * @param DataModel $model */ public function onBeforeCheck(&$model) { $model->addSkipCheckField('created_on'); $model->addSkipCheckField('created_by'); }