mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-18 02:39:49 +00:00
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:
parent
5b805fe1da
commit
9bbfb31bf7
@ -21,7 +21,7 @@ const APPNAME_REGEX = new RegExp(/^[a-zA-Z0-9_-]+$/);
|
|||||||
const IP_REGEX = new RegExp(
|
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/,
|
/\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) {
|
export function validateEmail(input: string) {
|
||||||
if (!validEmail(input)) {
|
if (!validEmail(input)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user