From d578eb20bbaca77c2cf398ac0b04c417effed4a1 Mon Sep 17 00:00:00 2001 From: John Ryan Date: Tue, 6 Sep 2022 16:57:49 -0700 Subject: [PATCH] Remove mention of defunct when_null_skip= kwarg Removed as part of vmware-tanzu/carvel-ytt#732 --- site/content/ytt/docs/develop/lang-ref-ytt-schema.md | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/site/content/ytt/docs/develop/lang-ref-ytt-schema.md b/site/content/ytt/docs/develop/lang-ref-ytt-schema.md index ee0dc659e..592fb0ccd 100644 --- a/site/content/ytt/docs/develop/lang-ref-ytt-schema.md +++ b/site/content/ytt/docs/develop/lang-ref-ytt-schema.md @@ -425,7 +425,7 @@ ytt: Error: Attaches a validation to the type being declared by the annotated node. ``` -@schema/validation rule0, rule1, ... [,] [,when=] [,when_null_skip=] +@schema/validation rule0, rule1, ... [,] [,when=] ``` where: @@ -439,12 +439,8 @@ where: - for the complete list, see [Named Validation Rules](#named-validation-rules), below. - `when=` (`function(value) : bool`) — criteria for when the validation rules should be checked. - `value` (`string` | `int` | `float` | `bool` | [`yamlfragment`](lang-ref-yaml-fragment.md)) — the value of the annotated node. -- `when_null_skip=` (`bool`) — a special-case of `when=` that checks if the value of the annotated node is `null`. default: `False` - - if the data value is also annotated `@schema/nullable`, this becomes `True`, by default. -#### Conditional Validation - -The criteria in `when=` and `when_null_skip=` are evaluated (if present). The validation is run if _both_ are `True`. For guidance on writing these conditions, see [How To Write Validations](how-to-write-validations.md#conditional-validations). +When present, the predicate given for `when=` is run. If it evaluates to `True`, the validation is run. For guidance on writing these conditions, see [How To Write Validations](how-to-write-validations.md#conditional-validations). #### Validation Rule Evaluation