Skip to content

Loading…

Double date validation when element is built from annotation #192

Closed
thestanislav opened this Issue · 1 comment

2 participants

@thestanislav

Date validator should not be injected by default while building date element from annotation.
See https://github.com/doctrine/DoctrineORMModule/blob/master/src/DoctrineORMModule/Form/Annotation/ElementAnnotationsListener.php#L225
Especially without date format it will always validate to false for non default date formats like "Y/d/m"

Zend\Form\Element\Date already injects date validator by default while creating the element.
See https://github.com/zendframework/zf2/blob/master/library/Zend/Form/Element/DateTime.php#L123

@thestanislav thestanislav referenced this issue in maxnuf/DoctrineORMModule
@maxnuf maxnuf handle type annotation for date and datetime
set type to Zend\Form\Element\Date and Zend\Form\Element\DateTime respectively
a9f5fe7
@Ocramius
Doctrine member

Handled in #192

@Ocramius Ocramius closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.