@@ -473,11 +473,15 @@ |
||
473 | 473 | $thisRuleArr = array_filter(explode('|', $this->rules)); |
474 | 474 | |
475 | 475 | $this->rules = array_merge($thisRuleArr, $rules); |
476 | - if (in_array('required', $this->rules)) $this->required(); |
|
476 | + if (in_array('required', $this->rules)) { |
|
477 | + $this->required(); |
|
478 | + } |
|
477 | 479 | } elseif (is_string($rules)) { |
478 | 480 | $rules = array_filter(explode('|', "{$this->rules}|$rules")); |
479 | 481 | |
480 | - if (in_array('required', $rules)) $this->required(); |
|
482 | + if (in_array('required', $rules)) { |
|
483 | + $this->required(); |
|
484 | + } |
|
481 | 485 | $this->rules = implode('|', $rules); |
482 | 486 | } |
483 | 487 |