0

私はこれを読んでいました

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

そして私はそれを保存しようとします。次に、検証が実行される順序。つまり

  1. つまり、symfony が null でないアノテーションを読み取るタイミングと、それを読み取る方法です。
  2. それを確認するために使用する正確な手順/ファイル
4

1 に答える 1