[Form] fixed invalid 'type' option in ValidatorTypeGuesser for Date/TimeFields
Field type guessing breaks, if you use any of the Date/Time constraints, since these field types have no 'type' default option defined.
This commit is contained in:
parent
68eca0f9b9
commit
41bed29c80
@ -134,13 +134,13 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
|
|||||||
case 'Symfony\Component\Validator\Constraints\Date':
|
case 'Symfony\Component\Validator\Constraints\Date':
|
||||||
return new TypeGuess(
|
return new TypeGuess(
|
||||||
'date',
|
'date',
|
||||||
array('type' => 'string'),
|
array(),
|
||||||
Guess::HIGH_CONFIDENCE
|
Guess::HIGH_CONFIDENCE
|
||||||
);
|
);
|
||||||
case 'Symfony\Component\Validator\Constraints\DateTime':
|
case 'Symfony\Component\Validator\Constraints\DateTime':
|
||||||
return new TypeGuess(
|
return new TypeGuess(
|
||||||
'datetime',
|
'datetime',
|
||||||
array('type' => 'string'),
|
array(),
|
||||||
Guess::HIGH_CONFIDENCE
|
Guess::HIGH_CONFIDENCE
|
||||||
);
|
);
|
||||||
case 'Symfony\Component\Validator\Constraints\Email':
|
case 'Symfony\Component\Validator\Constraints\Email':
|
||||||
@ -212,7 +212,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
|
|||||||
case 'Symfony\Component\Validator\Constraints\Time':
|
case 'Symfony\Component\Validator\Constraints\Time':
|
||||||
return new TypeGuess(
|
return new TypeGuess(
|
||||||
'time',
|
'time',
|
||||||
array('type' => 'string'),
|
array(),
|
||||||
Guess::HIGH_CONFIDENCE
|
Guess::HIGH_CONFIDENCE
|
||||||
);
|
);
|
||||||
case 'Symfony\Component\Validator\Constraints\Url':
|
case 'Symfony\Component\Validator\Constraints\Url':
|
||||||
|
Reference in New Issue
Block a user