Fix not recognized "type" option exception

The exception about not recognized "type" option was raised when "date", "datetime", "time" type was guessed by validator type guesser using the date related constraint.
This commit is contained in:
gedrox 2012-07-25 14:05:22 +03:00
parent f4570d5e73
commit 0ea3769664

View File

@ -125,10 +125,10 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
return new TypeGuess('country', array(), Guess::HIGH_CONFIDENCE);
case 'Symfony\Component\Validator\Constraints\Date':
return new TypeGuess('date', array('type' => 'string'), Guess::HIGH_CONFIDENCE);
return new TypeGuess('date', array('input' => 'string'), Guess::HIGH_CONFIDENCE);
case 'Symfony\Component\Validator\Constraints\DateTime':
return new TypeGuess('datetime', array('type' => 'string'), Guess::HIGH_CONFIDENCE);
return new TypeGuess('datetime', array('input' => 'string'), Guess::HIGH_CONFIDENCE);
case 'Symfony\Component\Validator\Constraints\Email':
return new TypeGuess('email', array(), Guess::HIGH_CONFIDENCE);
@ -144,7 +144,7 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
return new TypeGuess('locale', array(), Guess::HIGH_CONFIDENCE);
case 'Symfony\Component\Validator\Constraints\Time':
return new TypeGuess('time', array('type' => 'string'), Guess::HIGH_CONFIDENCE);
return new TypeGuess('time', array('input' => 'string'), Guess::HIGH_CONFIDENCE);
case 'Symfony\Component\Validator\Constraints\Url':
return new TypeGuess('url', array(), Guess::HIGH_CONFIDENCE);