@@ 413-415 (lines=3) @@ | ||
410 | ||
411 | Ajde_Event::trigger($model, 'beforeCrudSave', [$crud]); |
|
412 | ||
413 | if (!$model->validate($crud->getOptions('fields'))) { |
|
414 | return ['operation' => $operation, 'success' => false, 'errors' => $model->getValidationErrors()]; |
|
415 | } |
|
416 | // if (!$model->autocorrect($crud->getOptions('fields'))) { |
|
417 | // return array('operation' => $operation, 'success' => false, 'errors' => $model->getAutocorrectErrors()); |
|
418 | // } |
|
@@ 488-490 (lines=3) @@ | ||
485 | ||
486 | // validate form |
|
487 | Ajde_Event::trigger($model, 'beforeCrudSave', [$crud]); |
|
488 | if (!$model->validate($crud->getOptions('fields'))) { |
|
489 | return ['operation' => 'save', 'success' => false, 'errors' => $model->getValidationErrors()]; |
|
490 | } |
|
491 | ||
492 | // prepare submission |
|
493 | $values = []; |