Skip to content

Commit 43a83ee

Browse files
committed
melhoria nas mensagens padrao
1 parent 520dc92 commit 43a83ee

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "geekcom/validator-docs",
3-
"description": "Biblioteca para validação de CPF, CNPJ e CNH",
3+
"description": "Biblioteca para validação de Título de Eleitor, CPF, CNPJ e CNH",
44
"license" : "MIT",
55
"authors": [
66
{

src/validator-docs/Validator.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function validateFormatoCpfCnpj($attribute, $value)
4545
}
4646

4747
/**
48-
* Valida se o CPF é válido
48+
* Valida CPF
4949
* @param string $attribute
5050
* @param string $value
5151
* @return boolean
@@ -76,7 +76,7 @@ protected function validateCpf($attribute, $value)
7676
}
7777

7878
/**
79-
* Valida se o CNPJ é válido
79+
* Valida CNPJ
8080
* @param string $attribute
8181
* @param string $value
8282
* @return boolean
@@ -108,7 +108,7 @@ protected function validateCnpj($attribute, $value)
108108
}
109109

110110
/**
111-
* Valida se o CNPJ é válido
111+
* Valida CNPJ ou CPF
112112
* @param string $attribute
113113
* @param string $value
114114
* @return boolean
@@ -119,7 +119,7 @@ protected function validateCpfCnpj($attribute, $value)
119119
}
120120

121121
/**
122-
* Valida se o CNH é válido
122+
* Valida CNH
123123
* @param string $attribute
124124
* @param string $value
125125
* @return boolean
@@ -164,7 +164,7 @@ protected function validateCnh($attribute, $value)
164164
}
165165

166166
/**
167-
* Valida se o Titulo de Eleitor é válido
167+
* Valida Titulo de Eleitor
168168
* @param string $attribute
169169
* @param string $value
170170
* @return boolean

src/validator-docs/ValidatorProvider.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ public function boot()
3737
protected function getMessages()
3838
{
3939
return [
40-
'cnh' => 'O campo :attribute não é uma carteira nacional de habilitação válida',
41-
'titulo_eleitor' => 'O campo :attribute não é um título de eleitor válido',
42-
'cnpj' => 'O campo :attribute não é um CNPJ válido',
43-
'cpf' => 'O campo :attribute não é um CPF válido',
44-
'cpf_cnpj' => 'O campo :attribute não é válido',
45-
'formato_cnpj' => 'O campo :attribute não possui o formato válido de CNPJ',
46-
'formato_cpf' => 'O campo :attribute não possui o formato válido de CPF',
47-
'formato_cpf_cnpj' => 'O campo :attribute não possui um formato válido',
40+
'cnh' => 'Carteira Nacional de Habilitação inválida',
41+
'titulo_eleitor' => 'Título de Eleitor inválido',
42+
'cnpj' => 'CNPJ inválido',
43+
'cpf' => 'CPF inválido',
44+
'cpf_cnpj' => 'CPF ou CNPJ inválido',
45+
'formato_cnpj' => 'Formato inválido para CNPJ',
46+
'formato_cpf' => 'Formato inválido para CPF',
47+
'formato_cpf_cnpj' => 'Formato inválido para CPF ou CNPJ',
4848
];
4949
}
5050

0 commit comments

Comments
 (0)