Fix username/mention regexes
* Allow underscore instead of hypen * Fix domain part handling * Add tests for remote mention
This commit is contained in:
@@ -24,7 +24,7 @@ export type IApp = {
|
||||
};
|
||||
|
||||
export function isValidNameId(nameId: string): boolean {
|
||||
return typeof nameId == 'string' && /^[a-zA-Z0-9\-]{3,30}$/.test(nameId);
|
||||
return typeof nameId == 'string' && /^[a-zA-Z0-9_]{3,30}$/.test(nameId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user