mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-23 09:23:48 +01:00
Fix bool-param-default
This commit is contained in:
parent
64766e1dae
commit
ab56f91c40
@ -172,7 +172,7 @@ export const isRemoteUser = (user: any): user is IRemoteUser =>
|
|||||||
!isLocalUser(user);
|
!isLocalUser(user);
|
||||||
|
|
||||||
//#region Validators
|
//#region Validators
|
||||||
export function validateUsername(username: string, remote?: boolean): boolean {
|
export function validateUsername(username: string, remote = false): boolean {
|
||||||
return typeof username == 'string' && (remote ? /^\w([\w-]*\w)?$/ : /^\w{1,20}$/).test(username);
|
return typeof username == 'string' && (remote ? /^\w([\w-]*\w)?$/ : /^\w{1,20}$/).test(username);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user