Skip to content

Commit f45d036

Browse files
committed
docs: fix sample code of Config\Validation
1 parent 026eb6b commit f45d036

6 files changed

Lines changed: 31 additions & 11 deletions

File tree

user_guide_src/source/libraries/validation/003.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
namespace Config;
44

5-
class Validation
5+
// ...
6+
7+
class Validation extends BaseConfig
68
{
79
// ...
810

user_guide_src/source/libraries/validation/013.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
namespace Config;
44

5-
class Validation
5+
// ...
6+
7+
class Validation extends BaseConfig
68
{
7-
public $signup = [
9+
// ...
10+
11+
public array $signup = [
812
'username' => 'required|max_length[30]',
913
'password' => 'required|max_length[255]',
1014
'pass_confirm' => 'required|max_length[255]|matches[password]',

user_guide_src/source/libraries/validation/015.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@
22

33
namespace Config;
44

5-
class Validation
5+
// ...
6+
7+
class Validation extends BaseConfig
68
{
7-
public $signup = [
9+
// ...
10+
11+
public array $signup = [
812
'username' => 'required|max_length[30]',
913
'password' => 'required|max_length[255]',
1014
'pass_confirm' => 'required|max_length[255]|matches[password]',
1115
'email' => 'required|max_length[254]|valid_email',
1216
];
1317

14-
public $signup_errors = [
18+
public array $signup_errors = [
1519
'username' => [
1620
'required' => 'You must choose a username.',
1721
],

user_guide_src/source/libraries/validation/016.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
namespace Config;
44

5-
class Validation
5+
// ...
6+
7+
class Validation extends BaseConfig
68
{
7-
public $signup = [
9+
// ...
10+
11+
public array $signup = [
812
'username' => [
913
'rules' => 'required|max_length[30]',
1014
'errors' => [
@@ -18,5 +22,6 @@ class Validation
1822
],
1923
],
2024
];
25+
2126
// ...
2227
}

user_guide_src/source/libraries/validation/032.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
namespace Config;
44

5-
class Validation
5+
// ...
6+
7+
class Validation extends BaseConfig
68
{
7-
public $templates = [
9+
// ...
10+
11+
public array $templates = [
812
'list' => 'CodeIgniter\Validation\Views\list',
913
'single' => 'CodeIgniter\Validation\Views\single',
1014
'my_list' => '_errors_list',

user_guide_src/source/libraries/validation/033.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
namespace Config;
44

5+
use CodeIgniter\Config\BaseConfig;
56
use CodeIgniter\Validation\CreditCardRules;
67
use CodeIgniter\Validation\FileRules;
78
use CodeIgniter\Validation\FormatRules;
89
use CodeIgniter\Validation\Rules;
910

10-
class Validation
11+
class Validation extends BaseConfig
1112
{
1213
// ...
1314

0 commit comments

Comments
 (0)