-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo_valid.yml
57 lines (48 loc) · 1.16 KB
/
demo_valid.yml
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#
# JBZoo Toolbox - Csv-Blueprint.
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @see https://github.com/JBZoo/Csv-Blueprint
#
# This schema is valid because match the CSV file (tests/fixtures/demo.csv) perfectly.
filename_pattern: /(demo|demo_.*|demo-.*)\.csv$/
extra: 123
columns:
- name: Name
extra: 123
rules:
not_empty: true
length_min: 4
length_max: 7
aggregate_rules:
is_unique: true
- name: City
extra: null
rules:
not_empty: true
is_capitalize: true
- name: Float
extra:
custom_key: "custom_value"
custom_key_2: "custom_value_2"
rules:
not_empty: true
is_float: true
num_min: -19366059128
num_max: 4825.186
aggregate_rules:
sum_max: 4692
- name: Birthday
extra: [123, 456]
rules:
not_empty: true
date_format: Y-m-d
- name: Favorite color
rules:
not_empty: true
allow_values: [ red, green, blue ]