-
-
Notifications
You must be signed in to change notification settings - Fork 641
Expand file tree
/
Copy pathvalidation.php
More file actions
231 lines (221 loc) · 11.4 KB
/
Copy pathvalidation.php
File metadata and controls
231 lines (221 loc) · 11.4 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
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<?php
return [
/*
|--------------------------------------------------------------------------
| Validation Language Lines
|--------------------------------------------------------------------------
|
| The following language lines contain the default error messages used by
| the validator class. Some of these rules have multiple versions such
| as the size rules. Feel free to tweak each of these messages here.
|
*/
'accepted' => 'Must be accepted.',
'accepted_if' => 'Must be accepted when :other is :value.',
'active_url' => 'This is not a valid URL.',
'after' => 'Must be a date after :date.',
'after_or_equal' => 'Must be a date after or equal to :date.',
'alpha' => 'May only contain letters.',
'alpha_dash' => 'May only contain letters, numbers, dashes and underscores.',
'alpha_num' => 'May only contain letters and numbers.',
'array' => 'Must be an array.',
'ascii' => 'Must only contain single-byte alphanumeric characters and symbols.',
'before' => 'Must be a date before :date.',
'before_or_equal' => 'Must be a date before or equal to :date.',
'between' => [
'array' => 'Must have between :min and :max items.',
'file' => 'Must be between :min and :max kilobytes.',
'numeric' => 'Must be between :min and :max.',
'string' => 'Must be between :min and :max characters.',
],
'boolean' => 'Must be true or false.',
'can' => 'Contains an unauthorized value.',
'confirmed' => 'Confirmation does not match.',
'current_password' => 'The password is incorrect.',
'date' => 'Not a valid date.',
'date_equals' => 'Must be a date equal to :date.',
'date_format' => 'Does not match the format :format.',
'decimal' => 'Must have :decimal decimal places.',
'declined' => 'Must be declined.',
'declined_if' => 'Must be declined when :other is :value.',
'different' => 'This field and :other must be different.',
'digits' => 'Must be :digits digits.',
'digits_between' => 'Must be between :min and :max digits.',
'dimensions' => 'Invalid image dimensions.',
'distinct' => 'This field has a duplicate value.',
'doesnt_end_with' => 'Must not end with one of the following: :values.',
'doesnt_start_with' => 'Must not start with one of the following: :values.',
'email' => 'Must be a valid email address.',
'ends_with' => 'Must end with :values',
'enum' => 'The selected :attribute is invalid.',
'exists' => 'This is invalid.',
'file' => 'Must be a file.',
'filled' => 'Must have a value.',
'gt' => [
'array' => 'Must have more than :value items.',
'file' => 'Must be greater than :value kilobytes.',
'numeric' => 'Must be greater than :value.',
'string' => 'Must be greater than :value characters.',
],
'gte' => [
'array' => 'Must have :value items or more.',
'file' => 'Must be greater than or equal :value kilobytes.',
'numeric' => 'Must be greater than or equal :value.',
'string' => 'Must be greater than or equal :value characters.',
],
'image' => 'Must be an image.',
'in' => 'This is invalid.',
'in_array' => 'This field does not exist in :other.',
'integer' => 'Must be an integer.',
'ip' => 'Must be a valid IP address.',
'ipv4' => 'Must be a valid IPv4 address.',
'ipv6' => 'Must be a valid IPv6 address.',
'json' => 'Must be a valid JSON string.',
'lowercase' => 'Must be lowercase.',
'lt' => [
'array' => 'Must have less than :value items.',
'file' => 'Must be less than :value kilobytes.',
'numeric' => 'Must be less than :value.',
'string' => 'Must be less than :value characters.',
],
'lte' => [
'array' => 'Must not have more than :value items.',
'file' => 'Must be less than or equal :value kilobytes.',
'numeric' => 'Must be less than or equal :value.',
'string' => 'Must be less than or equal :value characters.',
],
'mac_address' => 'Must be a valid MAC address.',
'max' => [
'array' => 'May not have more than :max items.',
'file' => 'May not be greater than :max kilobytes.',
'numeric' => 'May not be greater than :max.',
'string' => 'May not be greater than :max characters.',
],
'max_digits' => 'Must not have more than :max digits.',
'mimes' => 'Must be a file of type: :values.',
'mimetypes' => 'Must be a file of type: :values.',
'min' => [
'array' => 'Must have at least :min items.',
'file' => 'Must be at least :min kilobytes.',
'numeric' => 'Must be at least :min.',
'string' => 'Must be at least :min characters.',
],
'min_digits' => 'Must have at least :min digits.',
'missing' => 'Must be missing.',
'missing_if' => 'Must be missing when :other is :value.',
'missing_unless' => 'Must be missing unless :other is :value.',
'missing_with' => 'Must be missing when :values is present.',
'missing_with_all' => 'Must be missing when :values are present.',
'multiple_of' => 'Must be a multiple of :value.',
'not_in' => 'This is invalid.',
'not_regex' => 'Format is invalid.',
'numeric' => 'Must be a number.',
'present' => 'Must be present.',
'prohibited' => 'Prohibited.',
'prohibited_if' => 'Prohibited when :other is :value.',
'prohibited_unless' => 'Prohibited unless :other is in :values.',
'prohibits' => 'Prohibits :other from being present.',
'regex' => 'Format is invalid.',
'required' => 'This field is required.',
'required_array_keys' => 'Must contain entries for: :values.',
'required_if' => 'This field is required when :other is :value.',
'required_if_accepted' => 'This field is required when :other is accepted.',
'required_unless' => 'This field is required unless :other is in :values.',
'required_with' => 'This field is required when :values is present.',
'required_with_all' => 'This field is required when :values is present.',
'required_without' => 'This field is required when :values is not present.',
'required_without_all' => 'This field is required when none of :values are present.',
'same' => 'This field and :other must match.',
'size' => [
'array' => 'Must contain :size items.',
'file' => 'Must be :size kilobytes.',
'numeric' => 'Must be :size.',
'string' => 'Must be :size characters.',
],
'starts_with' => 'Must start with :values',
'string' => 'Must be a string.',
'timezone' => 'Must be a valid zone.',
'ulid' => 'Must be a valid ULID.',
'unique' => 'This value has already been taken.',
'uploaded' => 'Failed to upload.',
'uppercase' => 'Must be uppercase.',
'url' => 'Must be a valid URL.',
'uuid' => 'Must be a valid UUID.',
/*
|--------------------------------------------------------------------------
| Custom Statamic Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may validation messages for the custom rules provided by Statamic.
|
*/
'arr_fieldtype' => 'This is invalid.',
'handle' => 'Must contain only lowercase letters and numbers with underscores as separators.',
'handle_starts_with_number' => 'Cannot start with a number.',
'slug' => 'Must contain only letters and numbers with dashes or underscores as separators.',
'code_fieldtype_rulers' => 'This is invalid.',
'composer_package' => 'Must be a valid composer package name (eg. hasselhoff/kung-fury).',
'date_fieldtype_date_required' => 'Date is required.',
'date_fieldtype_end_date_invalid' => 'Not a valid end date.',
'date_fieldtype_end_date_required' => 'End date is required.',
'date_fieldtype_only_single_mode_allowed' => 'You can’t use the Range UI Mode when the field’s handle is "date". To use the Range UI Mode, change the handle to anything other than "date".',
'date_fieldtype_start_date_invalid' => 'Not a valid start date.',
'date_fieldtype_start_date_required' => 'Start date is required.',
'date_fieldtype_time_required' => 'Time is required.',
'duplicate_field_handle' => 'A field with a handle of :handle already exists.',
'duplicate_uri' => 'Duplicate URI :value',
'elevated_session_resend_code_unavailable' => 'Resend code is only available for verification code method.',
'elevated_session_verification_code' => 'The verification code is incorrect.',
'email_available' => 'A user with this email already exists.',
'fieldset_imported_recursively' => 'Fieldset :handle is being imported recursively.',
'form_chart_hidden_field' => 'Field :field is hidden and cannot be charted.',
'form_chart_unknown_chart' => 'Chart :chart does not exist.',
'form_chart_unknown_field' => 'Field :field does not exist on this form.',
'one_site_without_origin' => 'At least one site must not have an origin.',
'options_require_keys' => 'All options must have keys.',
'origin_cannot_be_disabled' => 'Cannot select a disabled origin.',
'parent_cannot_be_itself' => 'Cannot be its own parent.',
'parent_causes_root_children' => 'This would cause the root page to have children.',
'parent_exceeds_max_depth' => 'This would exceed the maximum depth.',
'reserved' => 'This is a reserved word.',
'reserved_field_handle' => 'Field with a handle of :handle is a reserved word.',
'unique_entry_value' => 'This value has already been taken.',
'unique_form_handle' => 'This value has already been taken.',
'unique_term_value' => 'This value has already been taken.',
'unique_user_value' => 'This value has already been taken.',
'unique_uri' => 'This URI has already been taken.',
'time' => 'Not a valid time.',
'asset_current_filename' => 'This is the current filename.',
'asset_file_exists' => 'A file already exists with this name.',
'asset_file_exists_same_content' => 'A file already exists with this name and has the same content. You may want to delete this rather than rename it.',
'asset_file_exists_different_content' => 'A file already exists with this name but has different content. You may want to replace the other file with this one instead.',
'invalid_two_factor_code' => 'The provided two factor authentication code was invalid.',
'invalid_two_factor_recovery_code' => 'The provided two factor recovery code was invalid.',
'bard_container_required_by_button' => 'This field is required by a toolbar button.',
/*
|--------------------------------------------------------------------------
| Custom Validation Language Lines
|--------------------------------------------------------------------------
|
| Here you may specify custom validation messages for attributes using the
| convention "attribute.rule" to name the lines. This makes it quick to
| specify a specific custom language line for a given attribute rule.
|
*/
'custom' => [
'attribute-name' => [
'rule-name' => 'custom-message',
],
],
/*
|--------------------------------------------------------------------------
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
| The following language lines are used to swap attribute place-holders
| with something more reader friendly such as E-Mail Address instead
| of "email". This simply helps us make messages a little cleaner.
|
*/
'attributes' => [],
];