Supported Constraints and DataTransformers
Here is a list of supported constraints and data transformers.
Constraints
Constraints are part of the Symfony validator component.
Consult the Symfony Validation Constraints Reference for
possible constraints.
Basic Constraints
String Constraints
Number Constraints
| Constraint |
Basic |
Additionals |
Extra Information |
| Range |
Yes (min max type) |
Yes |
|
Comparison Constraints
| Constraint |
Basic |
Additionals |
Extra Information |
| EqualTo |
No |
Partial |
Only supports scalar values |
| NotEqualTo |
No |
Partial |
Only supports scalar values |
| IdenticalTo |
No |
Partial |
Only supports scalar values |
| NotIdenticalTo |
No |
Partial |
Only supports scalar values |
| LessThan |
Partial |
Partial |
Floats are currently not fully supported |
| LessThanOrEqual |
Yes |
Yes |
|
| GreaterThan |
Partial |
Partial |
Floats are currently not fully supported |
| GreaterThanOrEqual |
Yes |
Yes |
|
Date Constraints
| Constraint |
Basic |
Additionals |
Extra Information |
| Date |
No |
No |
Date DataTransformer is supported |
| DateTime |
No |
No |
DateTime DataTransformer is supported |
| Time |
No |
No |
Time DataTransformer is supported |
Collection Constraints
| Constraint |
Basic |
Additionals |
Extra Information |
| Choice |
Partial |
Partial |
(min max choices) |
| Collection |
No |
No |
|
| Count |
No |
No |
|
| UniqueEntity |
No |
No |
For security reasons this will not be implemented |
| Language |
No |
No |
|
| Locale |
No |
No |
|
| Country |
No |
No |
|
File Constraints
| Constraint |
Basic |
Additionals |
Extra Information |
| File |
No |
Yes |
|
| Image |
No |
No |
|
Financial and other Number Constraints
| Constraint |
Basic |
Additionals |
Extra Information |
| CardScheme |
Yes |
Yes |
|
| Currency |
No |
No |
|
| Luhn |
No |
Yes |
|
| Iban |
No |
Yes |
|
| Isbn |
No |
No |
|
| Issn |
No |
No |
|
Other Constraints
| Constraint |
Basic |
Additionals |
Extra Information |
| Callback |
No |
No |
This can never be supported |
| Expression |
No |
No |
Almost impossible to support |
| All |
No |
No |
|
| UserPassword |
No |
No |
For security reasons this will not be implemented |
| Valid |
Yes |
Yes |
There is no direct rule mapper for this see FormDataConstraintFinder and ValidConstraintPass |
DataTransformer
DataTransformers are part of the Symfony form component and are run before the validator/constraints.
| DataTransformer |
Basic |
Additionals |
Extra Information |
| ArrayToPartsTransformer |
No |
No |
|
| BooleanToStringTransformer |
No |
No |
|
| ChoicesToBooleanArrayTransformer |
No |
No |
|
| ChoicesToValuesTransformer |
No |
No |
|
| ChoiceToBooleanArrayTransformer |
No |
No |
|
| ChoiceToValueTransformer |
No |
No |
|
| DataTransformerChain |
No |
No |
|
| DateTimeToArrayTransformer |
Yes |
Yes |
|
| DateTimeToLocalizedStringTransformer |
No |
No |
|
| DateTimeToRfc3339Transformer |
Partial |
Partial |
Only for form types TimeType, DateType, DateTimeType |
| DateTimeToStringTransformer |
Partial |
Partial |
Only for form types TimeType, DateType, DateTimeType |
| DateTimeToTimestampTransformer |
No |
No |
|
| IntegerToLocalizedStringTransformer |
No |
No |
|
| MoneyToLocalizedStringTransformer |
No |
No |
|
| NumberToLocalizedStringTransformer |
No |
No |
|
| PercentToLocalizedStringTransformer |
No |
No |
|
| ValueToDuplicatesTransformer |
Partial |
Partial |
Only for none compund fields |