Skip to content

Commit 9a494d8

Browse files
committed
Adjust server name requirements, closes pterodactyl#205
1 parent c3775f4 commit 9a494d8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

app/Repositories/ServerRepository.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function create(array $data)
7373
// Validate Fields
7474
$validator = Validator::make($data, [
7575
'owner' => 'bail|required',
76-
'name' => 'required|regex:/^([\w -]{4,35})$/',
76+
'name' => 'required|regex:/^([\w .-]{1,200})$/',
7777
'memory' => 'required|numeric|min:0',
7878
'swap' => 'required|numeric|min:-1',
7979
'io' => 'required|numeric|min:10|max:1000',
@@ -345,7 +345,7 @@ public function updateDetails($id, array $data)
345345
// Validate Fields
346346
$validator = Validator::make($data, [
347347
'owner' => 'email|exists:users,email',
348-
'name' => 'regex:([\w -]{4,35})',
348+
'name' => 'regex:([\w .-]{1,200})',
349349
]);
350350

351351
// Run validator, throw catchable and displayable exception if it fails.

resources/views/admin/servers/new.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<label for="name" class="control-label">Server Name</label>
4444
<div>
4545
<input type="text" autocomplete="off" name="name" class="form-control" value="{{ old('name') }}" />
46-
<p class="text-muted"><small><em>Character limits: <code>a-zA-Z0-9_-</code> and <code>[Space]</code> (max 35 characters)</em></small></p>
46+
<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>
4747
</div>
4848
</div>
4949
<div class="form-group col-md-6">

0 commit comments

Comments
 (0)