0

我正在创建一个 Symfony2 表单。

我可以验证以确保选择字段中发布的数据在其选择列表中吗?

4

2 回答 2

1

In choice field ,there is a property named strict set to true By default its value is false

于 2012-05-21T03:54:14.993 回答
1

是的,您可以使用选择验证约束。

http://symfony.com/doc/current/reference/constraints/Choice.html

于 2012-05-21T00:18:02.513 回答