Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Extends when it can : Validator\DateStep extends Validator\Date to reduce code redundancy #2717

Conversation

samsonasik
Copy link
Contributor

Reduce code redundancy by extends base class.

@@ -258,7 +226,6 @@ public function isValid($value)
try {
$valueDate = $this->convertToDateTime($value);
} catch (Exception\InvalidArgumentException $ex) {
$this->error(self::INVALID_DATE);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it make twice error in form when setDate is passed to form, so it removed because already in parent ;)

return $this;
}

/**
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed because already in parent : Zend\Validator\Date class.

@ghost ghost assigned weierophinney Oct 10, 2012
weierophinney added a commit that referenced this pull request Oct 10, 2012
- Trailing whitespace
weierophinney added a commit that referenced this pull request Oct 10, 2012
weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015
weierophinney added a commit to zendframework/zend-validator that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants