Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function validate($value, $rules, $errors = []) |
||
14 | { |
||
15 | $this->CI->form_validation->reset_validation(); |
||
|
|||
16 | |||
17 | $data = [ |
||
18 | 'field' => $value |
||
19 | ]; |
||
20 | $this->CI->form_validation->set_data($data); |
||
21 | |||
22 | $this->CI->form_validation->set_rules('field', '', $rules, $errors); |
||
23 | |||
24 | if ($this->CI->form_validation->run() === FALSE) |
||
25 | { |
||
26 | show_error('不正な入力です。'); |
||
27 | } |
||
28 | else |
||
29 | { |
||
30 | return TRUE; |
||
31 | } |
||
32 | } |
||
33 | } |
||
34 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.