Commit a7b286bfb6679a876c712bc08a0befecc6e8fe6f

Authored by Alex Savenko
1 parent 2400f763

email validation

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
app/library/App/Controllers/UserController.php
... ... @@ -123,11 +123,12 @@ class UserController extends CrudResourceController
123 123  
124 124 $data = $this->getPostedData();
125 125  
126   - throw new Exception('777', $data[$email_field]);
127 126  
128 127 if (!isset($data[$email_field])) {
129 128  
130 129 $message = $validation->validate($data[$email_field]);
  130 +
  131 + throw new Exception('777', $message);
131 132 if (count($message)) {
132 133 throw new Exception(ErrorCodes::DATA_FAILED, 'Unable to create item', [
133 134 'messages' => $message,
... ...