Skip to content

Commit

Permalink
Profile: add phone number verification
Browse files Browse the repository at this point in the history
fix #210
  • Loading branch information
dpslwk committed May 26, 2019
1 parent 41cdfb3 commit b420222
Show file tree
Hide file tree
Showing 6 changed files with 241 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ protected function validator(array $data)
'addressCity' => 'required|max:100',
'addressCounty' => 'required|max:100',
'addressPostcode' => 'required|max:10',
'contactNumber' => 'required|max:50',
'contactNumber' => 'required|max:50|phone:AUTO,GB',
'dateOfBirth' => 'nullable|date_format:Y-m-d',
]);
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/MembershipController.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public function updateDetails(User $user, Request $request)
'addressCity' => 'required|max:100',
'addressCounty' => 'required|max:100',
'addressPostcode' => 'required|max:10',
'contactNumber' => 'required|max:50',
'contactNumber' => 'required|max:50|phone:AUTO,GB',
'dateOfBirth' => 'nullable|date_format:Y-m-d',
]);

Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function update(Request $request, User $user)
'addressCity' => 'sometimes|required|max:100',
'addressCounty' => 'sometimes|required|max:100',
'addressPostcode' => 'sometimes|required|max:10',
'contactNumber' => 'sometimes|required|max:50',
'contactNumber' => 'sometimes|required|max:50|phone:AUTO,GB',
'dateOfBirth' => 'sometimes|nullable|date_format:Y-m-d',
'unlockText' => 'sometimes|nullable|max:95',
]);
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"pragmarx/google2fa-laravel": "^1.0",
"pragmarx/recovery": "^0.1.0",
"predis/predis": "^1.1",
"propaganistas/laravel-phone": "^4.2",
"spatie/laravel-cookie-consent": "^2.0",
"tremby/laravel-git-version": "^1.1"
},
Expand Down
237 changes: 236 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions resources/lang/en/validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
'not_in' => 'The selected :attribute is invalid.',
'not_regex' => 'The :attribute format is invalid.',
'numeric' => 'The :attribute must be a number.',
'phone' => 'The :attribute field contains an invalid number.',
'present' => 'The :attribute field must be present.',
'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.',
Expand Down

0 comments on commit b420222

Please sign in to comment.