Spaces:
No application file
No application file
File size: 550 Bytes
d2897cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
<?php
namespace Mautic\LeadBundle\Validator\Constraints;
use Mautic\LeadBundle\Helper\FormFieldHelper;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Constraints\LengthValidator as SymfonyLengthValidator;
class LengthValidator extends SymfonyLengthValidator
{
public function validate($value, Constraint $constraint): void
{
if (is_array($value)) {
$value = FormFieldHelper::formatList(FormFieldHelper::FORMAT_BAR, $value);
}
parent::validate($value, $constraint);
}
}
|