-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo_invalid.yml
56 lines (48 loc) · 1.19 KB
/
demo_invalid.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
#
# 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 invalid because does not match the CSV file (tests/fixtures/demo.csv).
filename_pattern: /demo(-[123])?\.csv$/
columns:
- name: Name
rules:
not_empty: true
length_min: 5
length_max: 7
- name: City
rules:
not_empty: true
is_capitalize: true
aggregate_rules:
is_unique: true
- name: Float
example: Qwerty
rules:
not_empty: true
is_float: true
num_min: -19366059128
num_max: 4825.184
aggregate_rules:
nth_num: [ 4, 0.001 ]
- name: Birthday
rules:
not_empty: true
date_format: Y-m-d
date_min: "1955-05-15"
date_max: "2009-01-01"
aggregate_rules:
nth: [ 2, '2000-12-01' ]
- name: Favorite color
example: 123
rules:
not_empty: true
allow_values: [ red, green, Blue ]
- name: wrong_column_name