public function isValid() { if (parent::isValid()) { if (empty($this->format)) { $this->_error('invalid_format', $this->format); return False; } if (strptime($this->getValue(), $this->format) === False) { $this->_error('invalid_date', $this->format); return False; } $value = $this->getValue(); return empty($value) ? True : $this->passUserValidationRules(); } return False; }