/
errors.yml
113 lines (67 loc) · 2.35 KB
/
errors.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
en:
dry_schema:
or: "or"
errors:
unexpected_key: "is not allowed"
array?: "must be an array"
empty?: "must be empty"
excludes?: "must not include %{value}"
excluded_from?:
arg:
default: "must not be one of: %{list}"
range: "must not be one of: %{list_left} - %{list_right}"
exclusion?: "must not be one of: %{list}"
eql?: "must be equal to %{left}"
not_eql?: "must not be equal to %{left}"
filled?: "must be filled"
format?: "is in invalid format"
number?: "must be a number"
odd?: "must be odd"
even?: "must be even"
gt?: "must be greater than %{num}"
gteq?: "must be greater than or equal to %{num}"
hash?: "must be a hash"
included_in?:
arg:
default: "must be one of: %{list}"
range: "must be one of: %{list_left} - %{list_right}"
inclusion?: "must be one of: %{list}"
includes?: "must include %{value}"
bool?: "must be boolean"
true?: "must be true"
false?: "must be false"
int?: "must be an integer"
float?: "must be a float"
decimal?: "must be a decimal"
date?: "must be a date"
date_time?: "must be a date time"
time?: "must be a time"
key?: "is missing"
attr?: "is missing"
lt?: "must be less than %{num}"
lteq?: "must be less than or equal to %{num}"
max_size?: "size cannot be greater than %{num}"
max_bytesize?: "bytesize cannot be greater than %{num}"
min_size?: "size cannot be less than %{num}"
min_bytesize?: "bytesize cannot be less than %{num}"
nil?: "cannot be defined"
str?: "must be a string"
type?: "must be %{type}"
respond_to?: "must respond to %{method}"
size?:
arg:
default: "size must be %{size}"
range: "size must be within %{size_left} - %{size_right}"
value:
string:
arg:
default: "length must be %{size}"
range: "length must be within %{size_left} - %{size_right}"
bytesize?:
arg:
default: "must be %{size} bytes long"
range: "must be within %{size_left} - %{size_right} bytes long"
uuid_v4?: "is not a valid UUID"
uri?: "is not a valid URI"
not:
empty?: "cannot be empty"