From b97ebcbe392b96d3d689fd91d4de84036a548490 Mon Sep 17 00:00:00 2001 From: danny6167 Date: Fri, 4 Dec 2020 19:18:08 +0800 Subject: [PATCH] Allow 0 in first octet of database client IP address Fixes #2779 Allow user to enter database connection IP address that contains a a 0 in the first octet. Fixes #2779 --- .../components/server/databases/CreateDatabaseButton.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/scripts/components/server/databases/CreateDatabaseButton.tsx b/resources/scripts/components/server/databases/CreateDatabaseButton.tsx index 2ce843365..d70faffba 100644 --- a/resources/scripts/components/server/databases/CreateDatabaseButton.tsx +++ b/resources/scripts/components/server/databases/CreateDatabaseButton.tsx @@ -24,7 +24,7 @@ const schema = object().shape({ .matches(/^[A-Za-z0-9_\-.]{3,48}$/, 'Database name should only contain alphanumeric characters, underscores, dashes, and/or periods.'), connectionsFrom: string() .required('A connection value must be provided.') - .matches(/^([1-9]{1,3}|%)(\.([0-9]{1,3}|%))?(\.([0-9]{1,3}|%))?(\.([0-9]{1,3}|%))?$/, 'A valid connection address must be provided.'), + .matches(/^([0-9]{1,3}|%)(\.([0-9]{1,3}|%))?(\.([0-9]{1,3}|%))?(\.([0-9]{1,3}|%))?$/, 'A valid connection address must be provided.'), }); export default () => {