From 9a494d8245a35e6e171211b08b009608f830261d Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 30 Dec 2016 15:46:10 -0500 Subject: [PATCH] Adjust server name requirements, closes #205 --- app/Repositories/ServerRepository.php | 4 ++-- resources/views/admin/servers/new.blade.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Repositories/ServerRepository.php b/app/Repositories/ServerRepository.php index 14c0a42dc..a794e465b 100644 --- a/app/Repositories/ServerRepository.php +++ b/app/Repositories/ServerRepository.php @@ -73,7 +73,7 @@ class ServerRepository // Validate Fields $validator = Validator::make($data, [ 'owner' => 'bail|required', - 'name' => 'required|regex:/^([\w -]{4,35})$/', + 'name' => 'required|regex:/^([\w .-]{1,200})$/', 'memory' => 'required|numeric|min:0', 'swap' => 'required|numeric|min:-1', 'io' => 'required|numeric|min:10|max:1000', @@ -345,7 +345,7 @@ class ServerRepository // Validate Fields $validator = Validator::make($data, [ 'owner' => 'email|exists:users,email', - 'name' => 'regex:([\w -]{4,35})', + 'name' => 'regex:([\w .-]{1,200})', ]); // Run validator, throw catchable and displayable exception if it fails. diff --git a/resources/views/admin/servers/new.blade.php b/resources/views/admin/servers/new.blade.php index bb0a46f0e..4c38fcbaf 100644 --- a/resources/views/admin/servers/new.blade.php +++ b/resources/views/admin/servers/new.blade.php @@ -43,7 +43,7 @@
-

Character limits: a-zA-Z0-9_- and [Space] (max 35 characters)

+

Character limits: a-z A-Z 0-9 _ - . and [Space] (max 200 characters).