public function date(array $values)
    {
        if (count($values) != 1) {
            $vars = array('@field' => $this->translation->text('Condition'));
            return $this->translation->text('@field has invalid value', $vars);
        }

        $timestamp = strtotime(reset($values));

        if (empty($timestamp)) {
            $vars = array('@field' => $this->translation->text('Condition'));
            return $this->translation->text('@field has invalid value', $vars);
        }

        return true;
    }
public function date(array $values)
    {
        if (count($values) != 1) {
            $vars = array('@field' => $this->translation->text('Condition'));
            return $this->translation->text('@field has invalid value', $vars);
        }

        $timestamp = strtotime(reset($values));

        if (empty($timestamp)) {
            $vars = array('@field' => $this->translation->text('Condition'));
            return $this->translation->text('@field has invalid value', $vars);
        }

        return true;
    }
public function date ( array $ values ) { if ( count ( $ values ) != 1 ) { $ vars = array ( '@field' => $ this -> translation -> text ( 'Condition' ) ) ; return $ this -> translation -> text ( '@field has invalid value' , $ vars ) ; } $ timestamp = strtotime ( reset ( $ values ) ) ; if ( empty ( $ timestamp ) ) { $ vars = array ( '@field' => $ this -> translation -> text ( 'Condition' ) ) ; return $ this -> translation -> text ( '@field has invalid value' , $ vars ) ; } return true ; }
Validates the date condition
@param array $values
@return boolean|string
Validates the date condition