forked from alexjustesen/speedtest-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidation.php
More file actions
230 lines (223 loc) · 12.1 KB
/
validation.php
File metadata and controls
230 lines (223 loc) · 12.1 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
<?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' => 'O campo :attribute deve ser aceito.',
'accepted_if' => 'O :attribute deve ser aceito quando :other for :value.',
'active_url' => 'O campo :attribute não é uma URL válida.',
'after' => 'O campo :attribute deve ser uma data posterior a :date.',
'after_or_equal' => 'O campo :attribute deve ser uma data posterior ou igual a :date.',
'alpha' => 'O campo :attribute só pode conter letras.',
'alpha_dash' => 'O campo :attribute só pode conter letras, números e traços.',
'alpha_num' => 'O campo :attribute só pode conter letras e números.',
'array' => 'O campo :attribute deve ser uma matriz.',
'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.', // TODO
'before' => 'O campo :attribute deve ser uma data anterior :date.',
'before_or_equal' => 'O campo :attribute deve ser uma data anterior ou igual a :date.',
'between' => [
'numeric' => 'O campo :attribute deve ser entre :min e :max.',
'file' => 'O campo :attribute deve ser entre :min e :max kilobytes.',
'string' => 'O campo :attribute deve ser entre :min e :max caracteres.',
'array' => 'O campo :attribute deve ter entre :min e :max itens.',
],
'boolean' => 'O campo :attribute deve ser verdadeiro ou falso.',
'can' => 'The :attribute field contains an unauthorized value.', // TODO
'confirmed' => 'O campo :attribute de confirmação não confere.',
'current_password' => 'A senha está incorreta.',
'date' => 'O campo :attribute não é uma data válida.',
'date_equals' => 'O campo :attribute deve ser uma data igual a :date.',
'date_format' => 'O campo :attribute não corresponde ao formato :format.',
'decimal' => 'The :attribute field must have :decimal decimal places.', // TODO
'declined' => 'O :attribute deve ser recusado.',
'declined_if' => 'O :attribute deve ser recusado quando :other for :value.',
'different' => 'Os campos :attribute e :other devem ser diferentes.',
'digits' => 'O campo :attribute deve ter :digits dígitos.',
'digits_between' => 'O campo :attribute deve ter entre :min e :max dígitos.',
'dimensions' => 'O campo :attribute tem dimensões de imagem inválidas.',
'distinct' => 'O campo :attribute campo tem um valor duplicado.',
'doesnt_end_with' => 'O :attribute não pode terminar com um dos seguintes: :values.',
'doesnt_start_with' => 'O :attribute não pode começar com um dos seguintes: :values.',
'email' => 'O campo :attribute deve ser um endereço de e-mail válido.',
'ends_with' => 'O campo :attribute deve terminar com um dos seguintes: :values',
'enum' => 'O :attribute selecionado é inválido.',
'exists' => 'O campo :attribute selecionado é inválido.',
'file' => 'O campo :attribute deve ser um arquivo.',
'filled' => 'O campo :attribute deve ter um valor.',
'gt' => [
'numeric' => 'O campo :attribute deve ser maior que :value.',
'file' => 'O campo :attribute deve ser maior que :value kilobytes.',
'string' => 'O campo :attribute deve ser maior que :value caracteres.',
'array' => 'O campo :attribute deve conter mais de :value itens.',
],
'gte' => [
'numeric' => 'O campo :attribute deve ser maior ou igual a :value.',
'file' => 'O campo :attribute deve ser maior ou igual a :value kilobytes.',
'string' => 'O campo :attribute deve ser maior ou igual a :value caracteres.',
'array' => 'O campo :attribute deve conter :value itens ou mais.',
],
'image' => 'O campo :attribute deve ser uma imagem.',
'in' => 'O campo :attribute selecionado é inválido.',
'in_array' => 'O campo :attribute não existe em :other.',
'integer' => 'O campo :attribute deve ser um número inteiro.',
'ip' => 'O campo :attribute deve ser um endereço de IP válido.',
'ipv4' => 'O campo :attribute deve ser um endereço IPv4 válido.',
'ipv6' => 'O campo :attribute deve ser um endereço IPv6 válido.',
'json' => 'O campo :attribute deve ser uma string JSON válida.',
'lowercase' => 'The :attribute field must be lowercase.', // TODO
'lt' => [
'numeric' => 'O campo :attribute deve ser menor que :value.',
'file' => 'O campo :attribute deve ser menor que :value kilobytes.',
'string' => 'O campo :attribute deve ser menor que :value caracteres.',
'array' => 'O campo :attribute deve conter menos de :value itens.',
],
'lte' => [
'numeric' => 'O campo :attribute deve ser menor ou igual a :value.',
'file' => 'O campo :attribute deve ser menor ou igual a :value kilobytes.',
'string' => 'O campo :attribute deve ser menor ou igual a :value caracteres.',
'array' => 'O campo :attribute não deve conter mais que :value itens.',
],
'mac_address' => 'The :attribute field must be a valid MAC address.', // TODO
'max' => [
'numeric' => 'O campo :attribute não pode ser superior a :max.',
'file' => 'O campo :attribute não pode ser superior a :max kilobytes.',
'string' => 'O campo :attribute não pode ser superior a :max caracteres.',
'array' => 'O campo :attribute não pode ter mais do que :max itens.',
],
'max_digits' => 'O campo :attribute não pode ser superior a :max dígitos',
'mimes' => 'O campo :attribute deve ser um arquivo do tipo: :values.',
'mimetypes' => 'O campo :attribute deve ser um arquivo do tipo: :values.',
'min' => [
'numeric' => 'O campo :attribute deve ser pelo menos :min.',
'file' => 'O campo :attribute deve ter pelo menos :min kilobytes.',
'string' => 'O campo :attribute deve ter pelo menos :min caracteres.',
'array' => 'O campo :attribute deve ter pelo menos :min itens.',
],
'min_digits' => 'O campo :attribute deve ter pelo menos :min dígitos',
'missing' => 'The :attribute field must be missing.', // TODO
'missing_if' => 'The :attribute field must be missing when :other is :value.', // TODO
'missing_unless' => 'The :attribute field must be missing unless :other is :value.', // TODO
'missing_with' => 'O campo :attribute não deve estar presente quando houver :values.',
'missing_with_all' => 'The :attribute field must be missing when :values are present.', // TODO
'multiple_of' => 'O campo :attribute deve ser um múltiplo de :value.',
'not_in' => 'O campo :attribute selecionado é inválido.',
'not_regex' => 'O campo :attribute possui um formato inválido.',
'numeric' => 'O campo :attribute deve ser um número.',
'password' => [
'letters' => 'O campo :attribute deve conter pelo menos uma letra.',
'mixed' => 'O campo :attribute deve conter pelo menos uma letra maiúscula e uma letra minúscula.',
'numbers' => 'O campo :attribute deve conter pelo menos um número.',
'symbols' => 'O campo :attribute deve conter pelo menos um símbolo.',
'uncompromised' => 'A senha que você inseriu em :attribute está em um vazamento de dados. Por favor escolha uma senha diferente.',
],
'present' => 'O campo :attribute deve estar presente.',
'prohibited' => 'O campo :attribute é proibido.',
'prohibited_if' => 'O campo :attribute é proibido quando :other for :value.',
'prohibited_unless' => 'O campo :attribute é proibido exceto quando :other for :values.',
'prohibits' => 'O campo :attribute proíbe :other de estar presente.',
'regex' => 'O campo :attribute tem um formato inválido.',
'required' => 'O campo :attribute é obrigatório.',
'required_array_keys' => 'O campo :attribute deve conter entradas para: :values.',
'required_if' => 'O campo :attribute é obrigatório quando :other for :value.',
'required_if_accepted' => 'The :attribute field is required when :other is accepted.', // TODO
'required_unless' => 'O campo :attribute é obrigatório exceto quando :other for :values.',
'required_with' => 'O campo :attribute é obrigatório quando :values está presente.',
'required_with_all' => 'O campo :attribute é obrigatório quando :values está presente.',
'required_without' => 'O campo :attribute é obrigatório quando :values não está presente.',
'required_without_all' => 'O campo :attribute é obrigatório quando nenhum dos :values estão presentes.',
'same' => 'Os campos :attribute e :other devem corresponder.',
'size' => [
'numeric' => 'O campo :attribute deve ser :size.',
'file' => 'O campo :attribute deve ser :size kilobytes.',
'string' => 'O campo :attribute deve ser :size caracteres.',
'array' => 'O campo :attribute deve conter :size itens.',
],
'starts_with' => 'O campo :attribute deve começar com um dos seguintes valores: :values',
'string' => 'O campo :attribute deve ser uma string.',
'timezone' => 'O campo :attribute deve ser uma zona válida.',
'unique' => 'O campo :attribute já está sendo utilizado.',
'uploaded' => 'Ocorreu uma falha no upload do campo :attribute.',
'uppercase' => 'The :attribute field must be uppercase.', // TODO
'url' => 'O campo :attribute tem um formato inválido.',
'ulid' => 'The :attribute field must be a valid ULID.', // TODO
'uuid' => 'O campo :attribute deve ser um UUID válido.',
/*
|--------------------------------------------------------------------------
| 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 our attribute placeholder
| with something more reader friendly such as "E-Mail Address" instead
| of "email". This simply helps us make our message more expressive.
|
*/
'attributes' => [
'address' => 'endereço',
'age' => 'idade',
'body' => 'conteúdo',
'cell' => 'célula',
'city' => 'cidade',
'country' => 'país',
'date' => 'data',
'day' => 'dia',
'excerpt' => 'resumo',
'first_name' => 'primeiro nome',
'gender' => 'gênero',
'marital_status' => 'estado civil',
'profession' => 'profissão',
'nationality' => 'nacionalidade',
'hour' => 'hora',
'last_name' => 'sobrenome',
'message' => 'mensagem',
'minute' => 'minuto',
'mobile' => 'celular',
'month' => 'mês',
'name' => 'nome',
'zipcode' => 'cep',
'company_name' => 'razão social',
'neighborhood' => 'bairro',
'number' => 'número',
'password' => 'senha',
'phone' => 'telefone',
'second' => 'segundo',
'sex' => 'sexo',
'state' => 'estado',
'street' => 'rua',
'subject' => 'assunto',
'text' => 'texto',
'time' => 'hora',
'title' => 'título',
'username' => 'usuário',
'year' => 'ano',
'description' => 'descrição',
'password_confirmation' => 'confirmação da senha',
'current_password' => 'senha atual',
'complement' => 'complemento',
'modality' => 'modalidade',
'category' => 'categoria',
'blood_type' => 'tipo sanguíneo',
'birth_date' => 'data de nascimento',
],
];