我尝试创建我的验证器,但它不起作用。文档没有帮助,因为它只关心对象验证,并且有一个数组验证的示例。 我正在尝试根据与数据一起发送的字段来验证我的数据。因此,我在请求中有一个字段type,可以是credentials、google或facebook,根据这个字段的值,应该验证其他字段。当然,必须首先对type进行验证。给出以下示例: use Symfony\Component\Validator\Constraints as Assert;
use <e
我想在运行@SecurityAssert之前运行验证约束"NotBlank“。(否则会有不必要的数据库命中,用户是否会收到两条不同的错误消息)?谢谢!use Symfony\Component\Security\Core\Validator\Constraints as SecurityAssert; use Symfony\Component\Validator\C
我有一些$customObject,它是CustomClass的一个实例,我想用Symfony验证来验证它。CustomClass不是一个原则实体类。这是我的CustomClass:class SomeClass { * @Assert\NotBlank(message="Content should not be empty")
*