Welcome Guest, Not a member yet? Register   Sign In
Creating a custom service/library
#2

Assuming you define validationRules in the model, you need to use something like the following in your controller method:

PHP Code:
    if (!$this->validate($model->validationRules)) {
      $errors $this->validator->getErrors());
      //... do something with the errors array.
    
Reply


Messages In This Thread
RE: Creating a custom service/library - by x1250 - 02-05-2020, 08:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB