An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
refactor: remove duplicated validation messages
peaklabs-deve77492186698
diff --git a/app/Console/Commands/CleanupNames.php b/app/Console/Commands/CleanupNames.phpindex 2451dc3edc..50ade59d41 100644--- a/app/Console/Commands/CleanupNames.php+++ b/app/Console/Commands/CleanupNames.php@@ -32,7 +32,7 @@ class CleanupNames extends Command{--backup : Create database backup before changes}{--force : Skip confirmation prompt}';- protected $description = 'Sanitize name fields by removing invalid characters (keeping only letters, numbers, spaces, dashes, underscores, dots, slashes, colons, parentheses)';+ protected $description = 'Sanitize name fields by removing dangerous characters';protected array $modelsToClean = ['Project' => Project::class,diff --git a/app/Livewire/Project/Application/General.php b/app/Livewire/Project/Application/General.phpindex dffe1ec67f..b7c17fcc3c 100644--- a/app/Livewire/Project/Application/General.php+++ b/app/Livewire/Project/Application/General.php@@ -232,8 +232,6 @@ class General extends ComponentValidationPatterns::combinedMessages(),['name.required' => 'The Name field is required.',- 'name.regex' => 'The Name may only contain letters, numbers, spaces, dashes (-), underscores (_), dots (.), slashes (/), colons (:), and parentheses ().',- 'description.regex' => 'The Description contains invalid characters. Only letters, numbers, spaces, and common punctuation (- _ . : / () \' " , ! ? @ # % & + = [] {} | ~ ` *) are allowed.','gitRepository.required' => 'The Git Repository field is required.','gitBranch.required' => 'The Git Branch field is required.','buildPack.required' => 'The Build Pack field is required.',diff --git a/app/Livewire/Project/Database/Mariadb/General.php b/app/Livewire/Project/Database/Mariadb/General.phpindex 429cfc387d..3bffc0bef7 100644--- a/app/Livewire/Project/Database/Mariadb/General.php+++ b/app/Livewire/Project/Database/Mariadb/General.php@@ -91,8 +91,6 @@ class General extends ComponentValidationPatterns::combinedMessages(),['name.required' => 'The Name field is required.',- 'name.regex' => 'The Name may only contain letters, numbers, spaces, dashes (-), underscores (_), dots (.), slashes (/), colons (:), and parentheses ().',- 'description.regex' => 'The Description contains invalid characters. Only letters, numbers, spaces, and common punctuation (- _ . : / () \' " , ! ? @ # % & + = [] {} | ~ ` *) are allowed.','mariadbRootPassword.required' => 'The Root Password field is required.','mariadbUser.required' => 'The MariaDB User field is required.','mariadbPassword.required' => 'The MariaDB Password field is required.',diff --git a/app/Livewire/Project/Database/Mongodb/General.php b/app/Livewire/Project/Database/Mongodb/General.phpindex ae725fa4b6..5c0465c22f 100644--- a/app/Livewire/Project/Database/Mongodb/General.php+++ b/app/Livewire/Project/Database/Mongodb/General.php@@ -91,8 +91,6 @@ class General extends ComponentValidationPatterns::combinedMessages(),['name.required' => 'The Name field is required.',- 'name.regex' => 'The Name may only contain letters, numbers, spaces, dashes (-), underscores (_), dots (.), slashes (/), colons (:), and parentheses ().',- 'description.regex' => 'The Description contains invalid characters. Only letters, numbers, spaces, and common punctuation (- _ . : / () \' " , ! ? @ # % & + = [] {} | ~ ` *) are allowed.','mongoInitdbRootUsername.required' => 'The Root Username field is required.','mongoInitdbRootPassword.required' => 'The Root Password field is required.','mongoInitdbDatabase.required' => 'The MongoDB Database field is required.',diff --git a/app/Livewire/Project/Database/Mysql/General.php b/app/Livewire/Project/Database/Mysql/General.phpindex cffedcd23c..5ac34299c2 100644--- a/app/Livewire/Project/Database/Mysql/General.php+++ b/app/Livewire/Project/Database/Mysql/General.php@@ -94,8 +94,6 @@ class General extends ComponentValidationPatterns::combinedMessages(),['name.required' => 'The Name field is required.',- 'name.regex' => 'The Name may only contain letters, numbers, spaces, dashes (-), underscores (_), dots (.), slashes (/), colons (:), and parentheses ().',- 'description.regex' => 'The Description contains invalid characters. Only letters, numbers, spaces, and common punctuation (- _ . : / () \' " , ! ? @ # % & + = [] {} | ~ ` *) are allowed.','mysqlRootPassword.required' => 'The Root Password field is required.','mysqlUser.required' => 'The MySQL User field is required.','mysqlPassword.required' => 'The MySQL Password field is required.',diff --git a/app/Livewire/Project/Database/Postgresql/General.php b/app/Livewire/Project/Database/Postgresql/General.phpindex 7ef2cdc4f1..84e34c145c 100644--- a/app/Livewire/Project/Database/Postgresql/General.php+++ b/app/Livewire/Project/Database/Postgresql/General.php@@ -106,8 +106,6 @@ class General extends ComponentValidationPatterns::combinedMessages(),['name.required' => 'The Name field is required.',- 'name.regex' => 'The Name may only contain letters, numbers, spaces, dashes (-), underscores (_), dots (.), slashes (/), colons (:), and parentheses ().',- 'description.regex' => 'The Description contains invalid characters. Only letters, numbers, spaces, and common punctuation (- _ . : / () \' " , ! ? @ # % & + = [] {} | ~ ` *) are allowed.','postgresUser.required' => 'The Postgres User field is required.','postgresPassword.required' => 'The Postgres Password field is required.','postgresDb.required' => 'The Postgres Database field is required.',diff --git a/app/Livewire/Project/Database/Redis/General.php b/app/Livewire/Project/Database/Redis/General.phpindex 846614d21e..f96f5d30ed 100644--- a/app/Livewire/Project/Database/Redis/General.php+++ b/app/Livewire/Project/Database/Redis/General.php@@ -88,8 +88,6 @@ class General extends ComponentValidationPatterns::combinedMessages(),['name.required' => 'The Name field is required.',- 'name.regex' => 'The Name may only contain letters, numbers, spaces, dashes (-), underscores (_), dots (.), slashes (/), colons (:), and parentheses ().',- 'description.regex' => 'The Description contains invalid characters. Only letters, numbers, spaces, and common punctuation (- _ . : / () \' " , ! ? @ # % & + = [] {} | ~ ` *) are allowed.','image.required' => 'The Docker Image field is required.','publicPort.integer' => 'The Public Port must be an integer.','redisUsername.required' => 'The Redis Username field is required.',diff --git a/app/Livewire/Project/Service/StackForm.php b/app/Livewire/Project/Service/StackForm.phpindex 72ae6915a7..64a7d8d8b2 100644--- a/app/Livewire/Project/Service/StackForm.php+++ b/app/Livewire/Project/Service/StackForm.php@@ -52,8 +52,6 @@ class StackForm extends ComponentValidationPatterns::combinedMessages(),['name.required' => 'The Name field is required.',- 'name.regex' => 'The Name may only contain letters, numbers, spaces, dashes (-), underscores (_), dots (.), slashes (/), colons (:), and parentheses ().',- 'description.regex' => 'The Description contains invalid characters. Only letters, numbers, spaces, and common punctuation (- _ . : / () \' " , ! ? @ # % & + = [] {} | ~ ` *) are allowed.','dockerComposeRaw.required' => 'The Docker Compose Raw field is required.','dockerCompose.required' => 'The Docker Compose field is required.',]diff --git a/app/Livewire/Security/PrivateKey/Show.php b/app/Livewire/Security/PrivateKey/Show.phpindex 6be1906891..fa7397d13d 100644--- a/app/Livewire/Security/PrivateKey/Show.php+++ b/app/Livewire/Security/PrivateKey/Show.php@@ -40,8 +40,6 @@ class Show extends ComponentValidationPatterns::combinedMessages(),['name.required' => 'The Name field is required.',- 'name.regex' => 'The Name may only contain letters, numbers, spaces, dashes (-), underscores (_), dots (.), slashes (/), colons (:), and parentheses ().',- 'description.regex' => 'The Description contains invalid characters. Only letters, numbers, spaces, and common punctuation (- _ . : / () \' " , ! ? @ # % & + = [] {} | ~ ` *) are allowed.','privateKeyValue.required' => 'The Private Key field is required.','privateKeyValue.string' => 'The Private Key must be a valid string.',]diff --git a/app/Livewire/Storage/Form.php b/app/Livewire/Storage/Form.phpindex d101d7b58f..4dc0b6ae23 100644--- a/app/Livewire/Storage/Form.php+++ b/app/Livewire/Storage/Form.php@@ -50,8 +50,6 @@ class Form extends Componentreturn array_merge(ValidationPatterns::combinedMessages(),[- 'name.regex' => 'The Name may only contain letters, numbers, spaces, dashes (-), underscores (_), dots (.), slashes (/), colons (:), and parentheses ().',- 'description.regex' => 'The Description contains invalid characters. Only letters, numbers, spaces, and common punctuation (- _ . : / () \' " , ! ? @ # % & + = [] {} | ~ ` *) are allowed.','region.required' => 'The Region field is required.','region.max' => 'The Region may not be greater than 255 characters.','key.required' => 'The Access Key field is required.',diff --git a/app/Livewire/Team/Index.php b/app/Livewire/Team/Index.phpindex e4daad311e..8a943e6b68 100644--- a/app/Livewire/Team/Index.php+++ b/app/Livewire/Team/Index.php@@ -37,8 +37,6 @@ class Index extends ComponentValidationPatterns::combinedMessages(),['name.required' => 'The Name field is required.',- 'name.regex' => 'The Name may only contain letters, numbers, spaces, dashes (-), underscores (_), dots (.), slashes (/), colons (:), and parentheses ().',- 'description.regex' => 'The Description contains invalid characters. Only letters, numbers, spaces, and common punctuation (- _ . : / () \' " , ! ? @ # % & + = [] {} | ~ ` *) are allowed.',]);}