[Form] simplified previous merge
This commit is contained in:
parent
7475a3924c
commit
3922fb839a
@ -142,7 +142,7 @@ class DateTimeToArrayTransformer extends BaseDateTimeTransformer
|
||||
));
|
||||
}
|
||||
|
||||
if (preg_match( '/^\d*$/', $value['month'] . $value['day'] . $value['year']) === 0) {
|
||||
if (!ctype_digit($value['month'].$value['day'].$value['year'])) {
|
||||
throw new TransformationFailedException('This is an invalid date');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user