[Form] Guess currency field based on validator constraint

This commit is contained in:
Jáchym Toušek 2015-09-26 15:01:53 +02:00 committed by Fabien Potencier
parent 47d001e821
commit 2993b0092e

View File

@ -118,6 +118,9 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
case 'Symfony\Component\Validator\Constraints\Country':
return new TypeGuess('country', array(), Guess::HIGH_CONFIDENCE);
case 'Symfony\Component\Validator\Constraints\Currency':
return new TypeGuess('currency', array(), Guess::HIGH_CONFIDENCE);
case 'Symfony\Component\Validator\Constraints\Date':
return new TypeGuess('date', array('input' => 'string'), Guess::HIGH_CONFIDENCE);