Adjust server name requirements, closes #205

This commit is contained in:
Dane Everitt 2016-12-30 15:46:10 -05:00
parent c3775f4164
commit 9a494d8245
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -43,7 +43,7 @@
<label for="name" class="control-label">Server Name</label>
<div>
<input type="text" autocomplete="off" name="name" class="form-control" value="{{ old('name') }}" />
<p class="text-muted"><small><em>Character limits: <code>a-zA-Z0-9_-</code> and <code>[Space]</code> (max 35 characters)</em></small></p>
<p class="text-muted"><small><em>Character limits: <code>a-z A-Z 0-9 _ - .</code> and <code>[Space]</code> (max 200 characters).</em></small></p>
</div>
</div>
<div class="form-group col-md-6">