public function greaterThan($field, $value, $message = null, $when = null)
    {
        $extra = array_filter(['on' => $when, 'message' => $message]);

        return $this->add($field, 'greaterThan', $extra + [
            'rule' => ['comparison', Validation::COMPARE_GREATER, $value]
        ]);
    }
public function greaterThan($field, $value, $message = null, $when = null)
    {
        $extra = array_filter(['on' => $when, 'message' => $message]);

        return $this->add($field, 'greaterThan', $extra + [
            'rule' => ['comparison', Validation::COMPARE_GREATER, $value]
        ]);
    }
public function greaterThan ( $ field , $ value , $ message = null , $ when = null ) { $ extra = array_filter ( [ 'on' => $ when , 'message' => $ message ] ) ; return $ this -> add ( $ field , 'greaterThan' , $ extra + [ 'rule' => [ 'comparison' , Validation :: COMPARE_GREATER , $ value ] ] ) ; }
Add a greater than comparison rule to a field.

@param string $field The field you want to apply the rule to.
@param int|float $value The value user data must be greater than.
@param string|null $message The error message when the rule fails.
@param string|callable|null $when Either 'create' or 'update' or a callable that returns
true when the validation rule should be applied.
@see \Cake\Validation\Validation::comparison()
@return $this
Add a greater than comparison rule to a field .