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
This commit is contained in:
commit
181d470399
@ -118,6 +118,9 @@ class ValidatorTypeGuesser implements FormTypeGuesserInterface
|
|||||||
case 'Symfony\Component\Validator\Constraints\Country':
|
case 'Symfony\Component\Validator\Constraints\Country':
|
||||||
return new TypeGuess('country', array(), Guess::HIGH_CONFIDENCE);
|
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':
|
case 'Symfony\Component\Validator\Constraints\Date':
|
||||||
return new TypeGuess('date', array('input' => 'string'), Guess::HIGH_CONFIDENCE);
|
return new TypeGuess('date', array('input' => 'string'), Guess::HIGH_CONFIDENCE);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user