Validation.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace Config;
  3. use CodeIgniter\Config\BaseConfig;
  4. use CodeIgniter\Validation\StrictRules\CreditCardRules;
  5. use CodeIgniter\Validation\StrictRules\FileRules;
  6. use CodeIgniter\Validation\StrictRules\FormatRules;
  7. use CodeIgniter\Validation\StrictRules\Rules;
  8. class Validation extends BaseConfig
  9. {
  10. // --------------------------------------------------------------------
  11. // Setup
  12. // --------------------------------------------------------------------
  13. /**
  14. * Stores the classes that contain the
  15. * rules that are available.
  16. *
  17. * @var list<string>
  18. */
  19. public array $ruleSets = [
  20. Rules::class,
  21. FormatRules::class,
  22. FileRules::class,
  23. CreditCardRules::class,
  24. ];
  25. /**
  26. * Specifies the views that are used to display the
  27. * errors.
  28. *
  29. * @var array<string, string>
  30. */
  31. public array $templates = [
  32. 'list' => 'CodeIgniter\Validation\Views\list',
  33. 'single' => 'CodeIgniter\Validation\Views\single',
  34. 'field' => 'templates/validations/field',
  35. 'group' => 'templates/validations/group',
  36. ];
  37. // --------------------------------------------------------------------
  38. // Rules
  39. // --------------------------------------------------------------------
  40. }