public function __construct($startField, $stopField, $options = array(), $messages = array()) { parent::__construct($startField, sfValidatorSchemaCompare::LESS_THAN, $stopField, $options, $messages); }
/** * Constructor. * * Available options: * * @see sfValidatorSchemaCompare for rest of options * * skip_if_one_empty: Skip validation if at least one value is empty. * * skip_if_both_empty: Skip validation only if both values empty. * * left_field: The left field name * * operator: The comparison operator * * self::EQUAL * * self::NOT_EQUAL * * self::IDENTICAL * * self::NOT_IDENTICAL * * self::LESS_THAN * * self::LESS_THAN_EQUAL * * self::GREATER_THAN * * self::GREATER_THAN_EQUAL * * right_field: The right field name * * throw_global_error: Whether to throw a global error (false by default) or an error tied to the left field * * @param string $leftField The left field name * @param string $operator The operator to apply * @param string $rightField The right field name * @param array $options An array of options * @param array $messages An array of error messages * * */ public function __construct($leftField, $operator, $rightField, $options = array(), $messages = array()) { $this->addOption('skip_if_one_empty', false); $this->addOption('skip_if_both_empty', false); parent::__construct($leftField, $operator, $rightField, $options, $messages); }