PHP code example of rockbuzz / lara-custom-validation
1. Go to this page and download the library: Download rockbuzz/lara-custom-validation library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rockbuzz / lara-custom-validation example snippets
use Rockbuzz\LaraCustomValidation\Rules\CNPJ;
public function rules()
{
return [
'field' => [new CNPJ],
];
}
use Rockbuzz\LaraCustomValidation\Rules\CPF;
public function rules()
{
return [
'field' => [new CPF],
];
}
use Rockbuzz\LaraCustomValidation\Rules\FullName;
public function rules()
{
return [
'field' => [new FullName],
];
}
use Rockbuzz\LaraCustomValidation\Rules\HaveLetters;
public function rules()
{
return [
'field' => [new HaveLetters],
];
}
use Rockbuzz\LaraCustomValidation\Rules\HaveNumbers;
public function rules()
{
return [
'field' => [new HaveNumbers],
];
}
use Rockbuzz\LaraCustomValidation\Rules\HaveSpecialCharacters;
public function rules()
{
return [
'field' => [new HaveSpecialCharacters],
];
}
use Rockbuzz\LaraCustomValidation\Rules\MatchOldPassword;
public function rules()
{
return [
'field' => [new MatchOldPassword],
];
}
use Rockbuzz\LaraCustomValidation\Rules\Slug;
public function rules()
{
return [
'field' => [new Slug],
];
}
public function rules()
{
return [
'new_password' => 'match_old_password',
];
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.