我在我的实体中配置了断言。
我创建了两种表单类型。
第一种,我有 当我尝试提交第一个表单时,它未经验证,因为 但是在第一种形式中,没有描述字段。 p>
div> name code>和
url code>。 在第二个我有
description code>。 p>
/ *
* @Assert / NotBlank()
* /
n $ description;
code> pre>
$ description code>为空。 p>
I have assert configured in my entity.
I created two forms types.
In the first, I have name
and url
. In the second I have description
.
/*
*@Assert/NotBlank()
*/
$description;
When I try to submit the first form, it is not validated because the $description
is blank.
But in the first form, not have the description field.