Skip to content

Commit 05ff6e4

Browse files
coendrtaylorotwell
andauthored
Update validation.md (#9075)
* Update validation.md * Update validation.md --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent 465083e commit 05ff6e4

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
@@ -941,6 +941,7 @@ Below is a list of all available validation rules and their function:
941941
[Regular Expression](#rule-regex)
942942
[Required](#rule-required)
943943
[Required If](#rule-required-if)
944+
[Required If Accepted](#rule-required-if-accepted)
944945
[Required Unless](#rule-required-unless)
945946
[Required With](#rule-required-with)
946947
[Required With All](#rule-required-with-all)
@@ -1664,6 +1665,11 @@ If you would like to construct a more complex condition for the `required_if` ru
16641665
'role_id' => Rule::requiredIf(fn () => $request->user()->is_admin),
16651666
]);
16661667

1668+
<a name="rule-required-if-accepted"></a>
1669+
#### required_if_accepted:_anotherfield,...
1670+
1671+
The field under validation must be present and not empty if the _anotherfield_ field is equal to `yes`, `on`, `1`, `"1"`, `true`, or `"true"`.
1672+
16671673
<a name="rule-required-unless"></a>
16681674
#### required_unless:_anotherfield_,_value_,...
16691675

0 commit comments

Comments
 (0)