Commit 180ff9a4d1ba47d4f35b936bb17f39e854f8d702

Authored by Alex Savenko
1 parent 6414b151

email validation

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
app/library/App/Controllers/UserController.php
... ... @@ -107,7 +107,7 @@ class UserController extends CrudResourceController
107 107  
108 108 protected function beforeHandleWrite()
109 109 {
110   - throw new Exception('777', "test exception");
  110 +
111 111 $email_field = 'email';
112 112  
113 113 $validation = new Validation();
... ... @@ -123,6 +123,8 @@ class UserController extends CrudResourceController
123 123  
124 124 $data = $this->getPostedData();
125 125  
  126 + throw new Exception('777', $data);
  127 +
126 128 if (!isset($data[$email_field])) {
127 129  
128 130 $message = $validation->validate($data[$email_field]);
... ...