-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata-validator-config.json
More file actions
67 lines (67 loc) · 1.49 KB
/
data-validator-config.json
File metadata and controls
67 lines (67 loc) · 1.49 KB
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
58
59
60
61
62
63
64
65
66
67
{
"ignore_columns": [
"campaign_tag",
"email"
],
"data_types": {
"unique_id": "string",
"first_name": "string",
"last_name": "string"
},
"ranges": {
"age": {
"min": 18,
"max": 100
},
"salary": {
"min": 0
},
"score": {
"min": 0,
"max": 100
}
},
"date_formats": {
"created_at": "YYYY-MM-DD",
"updated_at": "YYYY-MM-DD",
"signup_date": "MM/DD/YYYY"
},
"custom_rules": {
"email_format": {
"column": "email",
"type": "regex",
"pattern": "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",
"message": "Invalid email format"
},
"phone_format": {
"column": "phone",
"type": "regex",
"pattern": "^(\\+\\d{1,3}[- ]?)?\\(?\\d{3}\\)?[- ]?\\d{3}[- ]?\\d{4}$",
"message": "Invalid phone number format"
},
"valid_status": {
"column": "status",
"type": "enum",
"values": [
"active",
"inactive",
"pending",
"suspended"
],
"message": "Status must be one of the allowed values"
},
"address_required_if_shipping": {
"column": "shipping_address",
"type": "dependency",
"depends_on": "requires_shipping",
"condition": "not_null",
"message": "Shipping address is required when shipping is needed"
},
"zip_code_format": {
"column": "zip_code",
"type": "regex",
"pattern": "^\\d{5}(-\\d{4})?$",
"message": "Invalid US ZIP code format"
}
}
}