public function addUpdate(callable $rule, $name = null, array $options = [])
    {
        $this->_updateRules[] = $this->_addError($rule, $name, $options);

        return $this;
    }
public function addUpdate(callable $rule, $name = null, array $options = [])
    {
        $this->_updateRules[] = $this->_addError($rule, $name, $options);

        return $this;
    }
public function addUpdate ( callable $ rule , $ name = null , array $ options = [ ] ) { $ this -> _updateRules [ ] = $ this -> _addError ( $ rule , $ name , $ options ) ; return $ this ; }
Adds a rule that will be applied to the entity on update operations.

### Options

The options array accept the following special keys:

- `errorField`: The name of the entity field that will be marked as invalid
if the rule does not pass.
- `message`: The error message to set to `errorField` if the rule does not pass.

@param callable $rule A callable function or object that will return whether
the entity is valid or not.
@param string|null $name The alias for a rule.
@param array $options List of extra options to pass to the rule callable as
second argument.
@return $this
Adds a rule that will be applied to the entity on update operations .