|
|
@ -68,6 +68,10 @@ class RegisterController extends Controller
|
|
|
|
$underscore = substr_count($value, '_');
|
|
|
|
$underscore = substr_count($value, '_');
|
|
|
|
$period = substr_count($value, '.');
|
|
|
|
$period = substr_count($value, '.');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(ends_with($value, ['.php', '.js', '.css'])) {
|
|
|
|
|
|
|
|
return $fail('Username is invalid.');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(($dash + $underscore + $period) > 1) {
|
|
|
|
if(($dash + $underscore + $period) > 1) {
|
|
|
|
return $fail('Username is invalid. Can only contain one dash (-), period (.) or underscore (_).');
|
|
|
|
return $fail('Username is invalid. Can only contain one dash (-), period (.) or underscore (_).');
|
|
|
|
}
|
|
|
|
}
|
|
|
|