* Update parser.ts * Update user.ts * Update search.ts * Update parser.ts * Update parser.ts * Update parser.ts * Update parser.ts * Update parser.ts * Update parser.ts * Update mfm.ts * Update parser.ts * Merge branch 'develop' into 3440-mk2 * Fix typo * Update parser.ts * Update mfm.ts * Update mfm.ts
This commit is contained in:

committed by
Aya Morisawa

parent
82d721d60b
commit
3bcb344ecb
@@ -155,7 +155,7 @@ export const isRemoteUser = (user: any): user is IRemoteUser =>
|
||||
|
||||
//#region Validators
|
||||
export function validateUsername(username: string, remote?: boolean): boolean {
|
||||
return typeof username == 'string' && (remote ? /^\w+([\w\.-]+\w+)?$/ : /^[a-zA-Z0-9_]{1,20}$/).test(username);
|
||||
return typeof username == 'string' && (remote ? /^\w([\w-]*\w)?$/ : /^\w{1,20}$/).test(username);
|
||||
}
|
||||
|
||||
export function validatePassword(password: string): boolean {
|
||||
|
Reference in New Issue
Block a user