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 @@ -123,6 +123,25 @@ Parameter Description
123123``{{ value }} `` The current (invalid) value
124124================= ============================================================
125125
126+ exactly
127+ ~~~~~~~
128+
129+ **type **: ``integer ``
130+
131+ This option is the exact length value. Validation will fail if
132+ the given value's length is not **exactly ** equal to this value.
133+
134+ .. note ::
135+
136+ This option is the one being set by default when using the Length constraint
137+ without passing any named argument to it. This means that for example,
138+ ``@Assert\Length(20) `` and ``@Assert\Length(exactly=20) `` are equivalent, as
139+ well as ``#[Assert\Length(20)] `` and ``#[Assert\Length(exactly: 20)] ``.
140+
141+ .. versionadded :: 5.2
142+
143+ The named argument ``exactly `` was introduced in Symfony 5.2.
144+
126145exactMessage
127146~~~~~~~~~~~~
128147
You can’t perform that action at this time.
0 commit comments