Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 181d470

Browse files
committed
feature #15919 [Form] Guess currency field based on validator constraint (enumag)
This PR was submitted for the 2.3 branch but it was merged into the 2.8 branch instead (closes #15919). Discussion ---------- [Form] Guess currency field based on validator constraint | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 2993b00 [Form] Guess currency field based on validator constraint
2 parents 47d001e + 2993b00 commit 181d470

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Symfony/Component/Form/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)