Update RegisterController
This commit is contained in:
parent
5c0dee018e
commit
3b7ff030f2
2 changed files with 9 additions and 0 deletions
|
@ -68,6 +68,10 @@ class RegisterController extends Controller
|
|||
$underscore = substr_count($value, '_');
|
||||
$period = substr_count($value, '.');
|
||||
|
||||
if(ends_with($value, ['.php', '.js', '.css'])) {
|
||||
return $fail('Username is invalid.');
|
||||
}
|
||||
|
||||
if(($dash + $underscore + $period) > 1) {
|
||||
return $fail('Username is invalid. Can only contain one dash (-), period (.) or underscore (_).');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue