fix: Not able to create a portal if the custom domain is empty (#6224)
This commit is contained in:
@@ -18,6 +18,9 @@ export const isValidPassword = value => {
|
|||||||
};
|
};
|
||||||
export const isNumber = value => /^\d+$/.test(value);
|
export const isNumber = value => /^\d+$/.test(value);
|
||||||
export const isDomain = value => {
|
export const isDomain = value => {
|
||||||
const domainRegex = /^([\p{L}0-9]+(-[\p{L}0-9]+)*\.)+[a-z]{2,}$/gmu;
|
if (value !== '') {
|
||||||
return domainRegex.test(value);
|
const domainRegex = /^([\p{L}0-9]+(-[\p{L}0-9]+)*\.)+[a-z]{2,}$/gmu;
|
||||||
|
return domainRegex.test(value);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user