File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,25 @@ Parameter Description
163163``{{ value }} `` The current (invalid) value
164164================= ============================================================
165165
166+ exactly
167+ ~~~~~~~
168+
169+ **type **: ``integer ``
170+
171+ This option is the exact length value. Validation will fail if
172+ the given value's length is not **exactly ** equal to this value.
173+
174+ .. note ::
175+
176+ This option is the one being set by default when using the Length constraint
177+ without passing any named argument to it. This means that for example,
178+ ``@Assert\Length(20) `` and ``@Assert\Length(exactly=20) `` are equivalent, as
179+ well as ``#[Assert\Length(20)] `` and ``#[Assert\Length(exactly: 20)] ``.
180+
181+ .. versionadded ::
182+
183+ The named argument ``exactly `` was introduced in Symfony 5.2.
184+
166185exactMessage
167186~~~~~~~~~~~~
168187
You can’t perform that action at this time.
0 commit comments