Skip to content

Commit 5fac71e

Browse files
enumagfabpot
authored andcommitted
[Form] Guess currency field based on validator constraint
1 parent cad5b19 commit 5fac71e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Extension/Validator/ValidatorTypeGuesser.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ public function guessTypeForConstraint(Constraint $constraint)
118118
case 'Symfony\Component\Validator\Constraints\Country':
119119
return new TypeGuess('country', array(), Guess::HIGH_CONFIDENCE);
120120

121+
case 'Symfony\Component\Validator\Constraints\Currency':
122+
return new TypeGuess('currency', array(), Guess::HIGH_CONFIDENCE);
123+
121124
case 'Symfony\Component\Validator\Constraints\Date':
122125
return new TypeGuess('date', array('input' => 'string'), Guess::HIGH_CONFIDENCE);
123126

0 commit comments

Comments
 (0)