| @@ 258-267 (lines=10) @@ | ||
| 255 | if (!empty($fRules)) { |
|
| 256 | $this->filterRules(['value' => $fRules]); |
|
| 257 | } |
|
| 258 | if (!empty($vRules)) { |
|
| 259 | $this->validationRules(['value' => $vRules]); |
|
| 260 | $errors = $this->validate(false, ['value' => $data['value']]); |
|
| 261 | if (true !== $errors) { |
|
| 262 | $this->notify(['warning' => $this->validationErrors($errors)]); |
|
| 263 | $f3->set('form', $mapper->cast()); |
|
| 264 | echo \View::instance()->render($this->template_path . 'edit.phtml'); |
|
| 265 | return; |
|
| 266 | } |
|
| 267 | } |
|
| 268 | ||
| 269 | // update required fields to check from ones which changed |
|
| 270 | // validate the entered data |
|
| @@ 240-249 (lines=10) @@ | ||
| 237 | if (!empty($fRules)) { |
|
| 238 | $this->filterRules(['value' => $fRules]); |
|
| 239 | } |
|
| 240 | if (!empty($vRules)) { |
|
| 241 | $this->validationRules(['value' => $vRules]); |
|
| 242 | $errors = $this->validate(false, ['value' => $data['value']]); |
|
| 243 | if (true !== $errors) { |
|
| 244 | $this->notify(['warning' => $this->validationErrors($errors)]); |
|
| 245 | $f3->set('form', $mapper->cast()); |
|
| 246 | echo \View::instance()->render($this->template_path . 'edit.phtml'); |
|
| 247 | return; |
|
| 248 | } |
|
| 249 | } |
|
| 250 | ||
| 251 | // update required fields to check from ones which changed |
|
| 252 | // validate the entered data |
|