mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
83 lines
2.2 KiB
PHP
Executable File
83 lines
2.2 KiB
PHP
Executable File
<?php
|
|
|
|
namespace Config;
|
|
|
|
|
|
use CodeIgniter\Shield\Authentication\Passwords\ValidationRules;
|
|
use CodeIgniter\Validation\CreditCardRules;
|
|
use CodeIgniter\Validation\FileRules;
|
|
use CodeIgniter\Validation\FormatRules;
|
|
use CodeIgniter\Validation\Rules;
|
|
|
|
class Validation
|
|
{
|
|
//--------------------------------------------------------------------
|
|
// Setup
|
|
//--------------------------------------------------------------------
|
|
|
|
/**
|
|
* Stores the classes that contain the
|
|
* rules that are available.
|
|
*
|
|
* @var string[]
|
|
*/
|
|
public array $ruleSets = [
|
|
Rules::class,
|
|
FormatRules::class,
|
|
FileRules::class,
|
|
CreditCardRules::class,
|
|
ValidationRules::class,
|
|
];
|
|
|
|
/**
|
|
* Specifies the views that are used to display the
|
|
* errors.
|
|
*
|
|
* @var array<string, string>
|
|
*/
|
|
public array $templates = [
|
|
'list' => 'CodeIgniter\Validation\Views\list',
|
|
'single' => 'CodeIgniter\Validation\Views\single',
|
|
'bootstrap_style' => 'themes/_commonPartialsBs/_form_validation_errors',
|
|
|
|
];
|
|
|
|
//--------------------------------------------------------------------
|
|
// Rules
|
|
//--------------------------------------------------------------------
|
|
//--------------------------------------------------------------------
|
|
// Rules For Login
|
|
//--------------------------------------------------------------------
|
|
/*public $login = [
|
|
// 'username' => [
|
|
// 'label' => 'Auth.username',
|
|
// 'rules' => [
|
|
// 'required',
|
|
// 'max_length[30]',
|
|
// 'min_length[3]',
|
|
// 'regex_match[/\A[a-zA-Z0-9\.]+\z/]',
|
|
// ],
|
|
// ],
|
|
'email' => [
|
|
'label' => 'Auth.email',
|
|
'rules' => [
|
|
'required',
|
|
'max_length[254]',
|
|
'valid_email'
|
|
],
|
|
],
|
|
'password' => [
|
|
'label' => 'Auth.password',
|
|
'rules' => [
|
|
'required',
|
|
'max_byte[72]',
|
|
],
|
|
'errors' => [
|
|
'max_byte' => 'Auth.errorPasswordTooLongBytes',
|
|
]
|
|
],
|
|
];*/
|
|
|
|
|
|
}
|