-
Notifications
You must be signed in to change notification settings - Fork 50
/
validation.php
executable file
·177 lines (169 loc) · 9.55 KB
/
validation.php
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
<?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.',
'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 superior ou igual a :date.',
'alpha' => 'O campo :attribute deve ser apenas 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 conter um array.',
'before' => 'O campo :attribute deve conter uma data anterior a :date.',
'before_or_equal' => 'O campo :attribute deve conter uma data inferior ou igual a :date.',
'between' => [
'numeric' => 'O campo :attribute deve conter um número entre :min e :max.',
'file' => 'O campo :attribute deve conter um arquivo de :min a :max kilobytes.',
'string' => 'O campo :attribute deve conter entre :min a :max caracteres.',
'array' => 'O campo :attribute deve conter de :min a :max itens.',
],
'boolean' => 'O campo :attribute deve conter o valor verdadeiro ou falso.',
'confirmed' => 'A confirmação para o campo :attribute não coincide.',
'date' => 'O campo :attribute não contém uma data válida.',
'date_format' => 'A data informada para o campo :attribute não respeita o formato :format.',
'different' => 'Os campos :attribute e :other devem conter valores diferentes.',
'digits' => 'O campo :attribute deve conter :digits dígitos.',
'digits_between' => 'O campo :attribute deve conter entre :min a :max dígitos.',
'dimensions' => 'O valor informado para o campo :attribute não é uma dimensão de imagem válida.',
'distinct' => 'O campo :attribute contém um valor duplicado.',
'email' => 'O campo :attribute não contém um endereço de email válido.',
'exists' => 'O valor selecionado para o campo :attribute é inválido.',
'file' => 'O campo :attribute deve conter um arquivo.',
'filled' => 'O campo :attribute é obrigatório.',
'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 ter mais que :value items.',
],
'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 ter :value items ou mais.',
],
'image' => 'O campo :attribute deve conter uma imagem.',
'in' => 'O campo :attribute não contém um valor válido.',
'in_array' => 'O campo :attribute não existe em :other.',
'integer' => 'O campo :attribute deve conter um número inteiro.',
'ip' => 'O campo :attribute deve conter um IP válido.',
'ipv4' => 'O campo :attribute deve conter um IPv4 válido.',
'ipv6' => 'O campo :attribute deve conter um IPv6 válido.',
'json' => 'O campo :attribute deve conter uma string JSON válida.',
'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 ter menos do que :value items.',
],
'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 ter mais do que :value items.',
],
'max' => [
'numeric' => 'O campo :attribute não pode conter um valor superior a :max.',
'file' => 'O campo :attribute não pode conter um arquivo com mais de :max kilobytes.',
'string' => 'O campo :attribute não pode conter mais de :max caracteres.',
'array' => 'O campo :attribute deve conter no máximo :max itens.',
],
'mimes' => 'O campo :attribute deve conter um arquivo do tipo: :values.',
'mimetypes' => 'O campo :attribute deve conter um arquivo do tipo: :values.',
'min' => [
'numeric' => 'O campo :attribute deve conter um número superior ou igual a :min.',
'file' => 'O campo :attribute deve conter um arquivo com no mínimo :min kilobytes.',
'string' => 'O campo :attribute deve conter no mínimo :min caracteres.',
'array' => 'O campo :attribute deve conter no mínimo :min itens.',
],
'not_in' => 'O campo :attribute contém um valor inválido.',
'not_regex' => 'The :attribute format is invalid.',
'numeric' => 'O campo :attribute deve conter um valor numérico.',
'present' => 'O campo :attribute deve estar presente.',
'regex' => 'O formato do valor informado no campo :attribute é inválido.',
'required' => 'O campo :attribute é obrigatório.',
'required_if' => 'O campo :attribute é obrigatório quando o valor do campo :other é igual a :value.',
'required_unless' => 'O campo :attribute é obrigatório a menos que :other esteja presente em :values.',
'required_with' => 'O campo :attribute é obrigatório quando :values está presente.',
'required_with_all' => 'O campo :attribute é obrigatório quando um dos :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á presente.',
'same' => 'Os campos :attribute e :other devem conter valores iguais.',
'size' => [
'numeric' => 'O campo :attribute deve conter o número :size.',
'file' => 'O campo :attribute deve conter um arquivo com o tamanho de :size kilobytes.',
'string' => 'O campo :attribute deve conter :size caracteres.',
'array' => 'O campo :attribute deve conter :size itens.',
],
'string' => 'O campo :attribute deve ser uma string.',
'timezone' => 'O campo :attribute deve conter um fuso horário válido.',
'unique' => 'O valor informado para o campo :attribute já está em uso.',
'uploaded' => 'Falha no Upload do arquivo :attribute.',
'url' => 'O formato da URL informada para o campo :attribute é invá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 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' => [
'address' => 'endereço',
'age' => 'idade',
'body' => 'conteúdo',
'city' => 'cidade',
'country' => 'país',
'date' => 'data',
'day' => 'dia',
'description' => 'descrição',
'excerpt' => 'resumo',
'first_name' => 'primeiro nome',
'gender' => 'gênero',
'hour' => 'hora',
'last_name' => 'sobrenome',
'message' => 'mensagem',
'minute' => 'minuto',
'mobile' => 'celular',
'month' => 'mês',
'name' => 'nome',
'password_confirmation' => 'confirmação da senha',
'password' => 'senha',
'phone' => 'telefone',
'second' => 'segundo',
'sex' => 'sexo',
'state' => 'estado',
'subject' => 'assunto',
'text' => 'texto',
'time' => 'hora',
'title' => 'título',
'username' => 'usuário',
'year' => 'ano',
],
];