for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace FlexPHP\Schema\Validators\Constraints;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\ConstraintViolationListInterface;
use Symfony\Component\Validator\Validation;
/**
* @Annotation
*/
class EqualToConstraintValidator
{
* @param mixed $string
* @return ConstraintViolationListInterface
public function validate($string): ConstraintViolationListInterface
$validator = Validation::createValidator();
return $validator->validate($string, [
new NotBlank(),
]);
}