fix regex check for server name to validate correctly

This commit is contained in:
Dane Everitt 2016-01-04 23:26:27 -05:00
parent a3af08e402
commit b5821ffb0f

View file

@ -52,7 +52,7 @@ class ServerRepository
$validator = Validator::make($data, [
'owner' => 'required|email|exists:users,email',
'node' => 'required|numeric|min:1|exists:nodes,id',
'name' => 'required|regex:([\w -]{4,35})',
'name' => 'required|regex:/^([\w -]{4,35})$/',
'memory' => 'required|numeric|min:1',
'swap' => 'required|numeric|min:0',
'disk' => 'required|numeric|min:1',