123456789101112131415161718192021222324 |
- <?php
- namespace WorkflowBundle\Validator\Constraints;
- use Symfony\Component\Validator\Constraint;
- use Symfony\Component\Validator\ConstraintValidator;
- use Symfony\Component\Yaml\Yaml;
- class ContainsYamlValidator extends ConstraintValidator
- {
- public function validate($value, Constraint $constraint)
- {
- $yaml = Yaml::dump($value,100,2);
-
-
-
-
- // if (!preg_match('/^[a-zA-Z0-9]+$/', $value, $matches)) {
- // $this->context->buildViolation($constraint->message)
- // ->setParameter('%string%', $value)
- // ->addViolation();
- // }
- }
- }
|