私はこれを読んでいました
http://symfony.com/doc/current/reference/constraints/NotNull.html
// src/Acme/BlogBundle/Entity/Author.php
namespace Acme\BlogBundle\Entity;
use Symfony\Component\Validator\Constraints as Assert;
class Author
{
/**
* @Assert\NotNull()
*/
protected $firstName;
}
form
今、私が提出したとき、私firstname
はそれを知りたいですnull
そして私はそれを保存しようとします。次に、検証が実行される順序。つまり
- つまり、symfony が null でないアノテーションを読み取るタイミングと、それを読み取る方法です。
- それを確認するために使用する正確な手順/ファイル