Skip to content

Commit df33e61

Browse files
[11.x] Document the list rule (#9529)
* Document the list rule * Update validation.md --------- Co-authored-by: Taylor Otwell <taylor@laravel.com>
1 parent fd9f558 commit df33e61

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

validation.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,7 @@ Below is a list of all available validation rules and their function:
916916
[JSON](#rule-json)
917917
[Less Than](#rule-lt)
918918
[Less Than Or Equal](#rule-lte)
919+
[List](#rule-list)
919920
[Lowercase](#rule-lowercase)
920921
[MAC Address](#rule-mac)
921922
[Max](#rule-max)
@@ -1471,6 +1472,11 @@ The field under validation must be less than or equal to the given _field_. The
14711472

14721473
The field under validation must be lowercase.
14731474

1475+
<a name="rule-list"></a>
1476+
#### list
1477+
1478+
The field under validation must be an array that is a list. An array is considered a list if its keys consist of consecutive numbers from 0 to `count($array) - 1`.
1479+
14741480
<a name="rule-mac"></a>
14751481
#### mac_address
14761482

0 commit comments

Comments
 (0)