| 1 | <?php |
||
| 5 | class TestForm extends AbstractForm { |
||
| 6 | |||
| 7 | protected $messages = [ |
||
| 8 | 'required' => 'Pole :attribute jest wymagane' |
||
| 9 | ]; |
||
| 10 | |||
| 11 | protected $fieldNames = [ |
||
| 12 | 'name' => 'Nazwa firmy' |
||
| 13 | ]; |
||
| 14 | |||
| 15 | protected $customRules = [ |
||
| 16 | 'name' => 'customValidate' |
||
| 17 | ]; |
||
| 18 | |||
| 19 | //Override construct to load config |
||
| 20 | public function __construct() { |
||
| 21 | parent::__construct(); |
||
| 22 | $this->loadFromConfigYaml(__DIR__ . '/../config/test.yml'); |
||
| 23 | |||
| 24 | |||
| 25 | } |
||
| 26 | |||
| 27 | //Custom validation class |
||
| 28 | public function customValidate($request) { |
||
| 31 | |||
| 32 | } |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.