You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
const USERNAME_REGEX = /^[a-zA-Z0-9]+((_|\.)?[a-zA-Z0-9])*$/;
|
|
|
|
// eslint-disable-next-line import/prefer-default-export
|
|
export const isUsername = (string) => {
|
|
return string.length >= 3 && string.length <= 16 && USERNAME_REGEX.test(string);
|
|
};
|