* 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:
parent
82d721d60b
commit
3bcb344ecb
4 changed files with 19 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue