fix: Invalid portal domain validation (#6166)
* fix: Invalid portal domain validation Co-authored-by: Shivam Mishra <scm.mymail@gmail.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
@@ -17,3 +17,7 @@ export const isValidPassword = value => {
|
||||
);
|
||||
};
|
||||
export const isNumber = value => /^\d+$/.test(value);
|
||||
export const isDomain = value => {
|
||||
const domainRegex = /^([\p{L}0-9]+(-[\p{L}0-9]+)*\.)+[a-z]{2,}$/gmu;
|
||||
return domainRegex.test(value);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user