From 53aae44e7a3917591d17dd19ffe25482ccbc4c38 Mon Sep 17 00:00:00 2001 From: Leandro Hermes Neto Date: Tue, 9 Mar 2021 15:45:45 -0300 Subject: [PATCH] Adds available validation rules Docs for `prohibited_if` and `prohibited_unless` validation rules added in https://github.com/laravel/framework/pull/36516 --- validation.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/validation.md b/validation.md index 7642f3b6f1c..5ed880d3204 100644 --- a/validation.md +++ b/validation.md @@ -717,6 +717,8 @@ Below is a list of all available validation rules and their function: [Numeric](#rule-numeric) [Password](#rule-password) [Present](#rule-present) +[Prohibited If](#rule-prohibited-if) +[Prohibited Unless](#rule-prohibited-unless) [Regular Expression](#rule-regex) [Required](#rule-required) [Required If](#rule-required-if) @@ -1127,6 +1129,16 @@ The field under validation must match the authenticated user's password. You may The field under validation must be present in the input data but can be empty. + +#### prohibited_if:_anotherfield_,_value_,... + +The field under validation must **not** be present if the _anotherfield_ field is equal to any _value_. + + +#### prohibited_unless:_anotherfield_,_value_,... + +The field under validation must **not** be present unless the _anotherfield_ field is equal to any _value_. + #### regex:_pattern_