Allow any amount of subdomains when parsing .local addresses

Change-type: patch
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2019-05-01 08:50:27 +01:00
parent 5b805fe1da
commit 9bbfb31bf7

View File

@ -21,7 +21,7 @@ const APPNAME_REGEX = new RegExp(/^[a-zA-Z0-9_-]+$/);
const IP_REGEX = new RegExp(
/\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/,
);
const DOTLOCAL_REGEX = new RegExp(/^[a-zA-Z0-9-]+\.local$/);
const DOTLOCAL_REGEX = new RegExp(/^([a-zA-Z0-9-]+\.)+local$/);
export function validateEmail(input: string) {
if (!validEmail(input)) {