rougail-output-doc/tests/docs/base/04_5validators.md

27 lines
3.8 KiB
Markdown
Raw Permalink Normal View History

2024-07-10 21:27:48 +02:00
---
gitea: none
include_toc: true
---
# dictionaries/rougail/00-base.yml
```yaml
---
version: '1.1'
int:
description: A number
type: number
validators:
- jinja: |
2024-07-10 21:27:48 +02:00
{% if _.int > 100 %}
value is too high
{% endif %}
description: the max value is 100
```
# Variables pour "rougail"
2024-07-10 21:27:48 +02:00
| Variable                                                                                                  | Description                                                                                               |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| **rougail.int**<br/>[`number`](https://rougail.readthedocs.io/en/latest/variable.html#variables-types) `basic` `obligatoire` | A number.<br/>**Validator**: the max value is 100. |
2024-07-10 21:27:48 +02:00