Skip to content

Commit b4f3d65

Browse files
committed
[Validator] Add new parameter for translation on Length constraint: current value length.
1 parent 8564b1e commit b4f3d65

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Tests/Functional/ApiAttributesTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,8 @@ public static function mapRequestPayloadProvider(): iterable
256256
"template": "This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.",
257257
"parameters": {
258258
"{{ value }}": "\"\"",
259-
"{{ limit }}": "10"
259+
"{{ limit }}": "10",
260+
"{{ value_length }}": "0"
260261
},
261262
"type": "urn:uuid:9ff3fdc4-b214-49db-8718-39c315e33d45"
262263
}
@@ -289,6 +290,7 @@ public static function mapRequestPayloadProvider(): iterable
289290
<parameters>
290291
<item key="{{ value }}">"H"</item>
291292
<item key="{{ limit }}">10</item>
293+
<item key="{{ value_length }}">1</item>
292294
</parameters>
293295
<type>urn:uuid:9ff3fdc4-b214-49db-8718-39c315e33d45</type>
294296
</violations>
@@ -336,7 +338,8 @@ public static function mapRequestPayloadProvider(): iterable
336338
"template": "This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.",
337339
"parameters": {
338340
"{{ value }}": "\"\"",
339-
"{{ limit }}": "10"
341+
"{{ limit }}": "10",
342+
"{{ value_length }}": "0"
340343
},
341344
"type": "urn:uuid:9ff3fdc4-b214-49db-8718-39c315e33d45"
342345
}

0 commit comments

Comments
 (0)