/
validators_config.yaml
30 lines (30 loc) · 1.2 KB
/
validators_config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
validator-config:
- tag: validate-as-version # for any data tagged with 'validate-as-version'
validator: regex # invoke the regex validator
config:
pattern: "^\\d+.\\d+$" # ensure the value matches this pattern
- tag: validate-as-date
validator: date
config:
- tag: validate-as-single-entry # for any data tagged with 'validate-as-single-entry'
validator: string # invoke the string validator
config:
method: "count" # cound the number of occurances in the string (see validators/string.py for a list of methods)
input-parameter: "\n" # of the value "\n"
expected-result: 0 # which should equal 0
- tag: validate-as-yes-no
validator: regex
config:
pattern: "(?i){{ translate.yes }}|{{ translate.no }}"
- tag: validate-as-CIA
validator: regex
config:
pattern: "(?i){{ translate.confidentiality }}|{{ translate.integrity }}|{{ translate.availability }}"
- tag: validate-as-status
validator: regex
config:
pattern: "(?i){{ translate.draft }}|{{ translate.approved }}|{{ translate.obsolete }}"
- tag: validate-from-template
validator: template
config: