Skip to content

Commit

Permalink
Merge pull request #1517 from knulpi/required-function
Browse files Browse the repository at this point in the history
add section about the `required` function
  • Loading branch information
angellk authored Oct 25, 2023
2 parents 7c0666a + cd91d7a commit 7587b6c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion content/en/docs/chart_template_guide/function_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ They are listed here and broken down by the following categories:
Helm includes numerous logic and control flow functions including [and](#and),
[coalesce](#coalesce), [default](#default), [empty](#empty), [eq](#eq),
[fail](#fail), [ge](#ge), [gt](#gt), [le](#le), [lt](#lt), [ne](#ne),
[not](#not), and [or](#or).
[not](#not), [or](#or), and [required](#required).

### and

Expand Down Expand Up @@ -134,6 +134,18 @@ The definition of "empty" depends on type:
For structs, there is no definition of empty, so a struct will never return the
default.

### required

Specify values that must be set with `required`:

```
required "A valid foo is required!" .Bar
```

If `.Bar` is empty or not defined (see [default](#default) on how this is
evaluated), the template will not render and will return the error message
supplied instead.

### empty

The `empty` function returns `true` if the given value is considered empty, and
Expand Down

0 comments on commit 7587b6c

Please sign in to comment.