@@ -1117,6 +1117,8 @@ Below is a list of all available validation rules and their function:
1117
1117
[ Present With All] ( #rule-present-with-all )
1118
1118
[ Prohibited] ( #rule-prohibited )
1119
1119
[ Prohibited If] ( #rule-prohibited-if )
1120
+ [ Prohibited If Accepted] ( #rule-prohibited-if-accepted )
1121
+ [ Prohibited If Declined] ( #rule-prohibited-if-declined )
1120
1122
[ Prohibited Unless] ( #rule-prohibited-unless )
1121
1123
[ Prohibits] ( #rule-prohibits )
1122
1124
[ Required] ( #rule-required )
@@ -1996,6 +1998,15 @@ Validator::make($request->all(), [
1996
1998
'role_id' => Rule::prohibitedIf(fn () => $request->user()->is_admin),
1997
1999
]);
1998
2000
```
2001
+ <a name =" rule-prohibited-if-accepted " ></a >
2002
+ #### prohibited_if_accepted:_ anotherfield_ ,...
2003
+
2004
+ The field under validation must be missing or empty if the _ anotherfield_ field is equal to ` "yes" ` , ` "on" ` , ` 1 ` , ` "1" ` , ` true ` , or ` "true" ` .
2005
+
2006
+ <a name =" rule-prohibited-if-declined " ></a >
2007
+ #### prohibited_if_declined:_ anotherfield_ ,...
2008
+
2009
+ The field under validation must be missing or empty if the _ anotherfield_ field is equal to ` "no" ` , ` "off" ` , ` 0 ` , ` "0" ` , ` false ` , or ` "false" ` .
1999
2010
2000
2011
<a name =" rule-prohibited-unless " ></a >
2001
2012
#### prohibited_unless:_ anotherfield_ ,_ value_ ,...
0 commit comments