mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 04:27:53 +00:00
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 isDomain = value => {
|
||||
const domainRegex = /^([\p{L}0-9]+(-[\p{L}0-9]+)*\.)+[a-z]{2,}$/gmu;
|
||||
return domainRegex.test(value);
|
||||
if (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