From 5117d931cabdcd6786839b98663b23c7ef5c1014 Mon Sep 17 00:00:00 2001 From: Timmy D'Hooghe <63366355+timmydhooghe@users.noreply.github.com> Date: Tue, 16 Apr 2024 17:32:13 +0200 Subject: [PATCH] Documenting the new RequiredIfDeclined validation rule (framework PR #51030) (#9579) --- validation.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/validation.md b/validation.md index 09600ce4e2..2154256744 100644 --- a/validation.md +++ b/validation.md @@ -948,6 +948,7 @@ Below is a list of all available validation rules and their function: [Required](#rule-required) [Required If](#rule-required-if) [Required If Accepted](#rule-required-if-accepted) +[Required If Declined](#rule-required-if-declined) [Required Unless](#rule-required-unless) [Required With](#rule-required-with) [Required With All](#rule-required-with-all) @@ -1732,6 +1733,11 @@ If you would like to construct a more complex condition for the `required_if` ru The field under validation must be present and not empty if the _anotherfield_ field is equal to `"yes"`, `"on"`, `1`, `"1"`, `true`, or `"true"`. + +#### required_if_declined:_anotherfield_,... + +The field under validation must be present and not empty if the _anotherfield_ field is equal to `"no"`, `"off"`, `0`, `"0"`, `false`, or `"false"`. + #### required_unless:_anotherfield_,_value_,...