'id', 'name' => 'name', 'pass' => 'pass', 'email' => 'email', 'role' => 'role' ]; } public function validation() { $validator = new Validation(); $validator->add( 'email', new EmailValidator( [ 'model' => $this, 'message' => 'Please enter a correct email address', ] ) ); return $this->validate($validator); } }