のアサーションがEntities
fromMinLength
およびMaxLength
toおよびtoLength
に変更されたため、バリデータのゲッサーはこれらの変更に従わず、属性が入力されないため、HTML 検証は に対して機能しません。Min
Max
Range
max_length
length
Symfony\Component\Validator\Constraints\Length
inguessMaxLengthForConstraint
関数の新しいケースが必要だと思いますSymfony\Component\Form\Extension\Validator\ValidatorTypeGuesser.php
それとも解決済みですか。
私は2.1.6を使用していますが、2.1.7を試しましたが、これを使用しても違いはありません:
/**
* @var float $height
*
* @ORM\Column(name="height", type="decimal", nullable=true)
*
*
* @Assert\Range(
* min = "20",
* max = "96",
* minMessage = "You must be at least 20 tall",
* maxMessage = "You cannot taller than 96"
* )
* @Assert\NotBlank(groups={"registration_step_two","profile_measurement"})
* @Assert\Regex(pattern= "/[0-9]/",message="Require number only")
* @Assert\MinLength(10)
*/