You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user_guide_src/source/libraries/validation.rst
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -461,12 +461,12 @@ Or as a labeled style::
461
461
);
462
462
463
463
If you’d like to include a field’s “human” name, or the optional parameter some rules allow for (such as max_length),
464
-
you can add the ``{field}``and ``{param}`` tags to your message, respectively::
464
+
or the value that was validated you can add the ``{field}``, ``{param}`` and ``{value}`` tags to your message, respectively::
465
465
466
-
'min_length' => '{field} must have at least {param} characters.'
466
+
'min_length' => 'Supplied value ({value}) for {field} must have at least {param} characters.'
467
467
468
-
On a field with the human name Username and a rule of min_length[5], an error would display: “Username must have
469
-
at least 5 characters.”
468
+
On a field with the human name Username and a rule of min_length[6] with a value of “Pizza”, an error would display: “Supplied value (Pizza) for Username must have
469
+
at least 6 characters.”
470
470
471
471
.. note:: If you pass the last parameter the labeled style error messages will be ignored.
0 commit comments