fix regex check for server name to validate correctly
This commit is contained in:
parent
a3af08e402
commit
b5821ffb0f
|
@ -52,7 +52,7 @@ class ServerRepository
|
||||||
$validator = Validator::make($data, [
|
$validator = Validator::make($data, [
|
||||||
'owner' => 'required|email|exists:users,email',
|
'owner' => 'required|email|exists:users,email',
|
||||||
'node' => 'required|numeric|min:1|exists:nodes,id',
|
'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',
|
'memory' => 'required|numeric|min:1',
|
||||||
'swap' => 'required|numeric|min:0',
|
'swap' => 'required|numeric|min:0',
|
||||||
'disk' => 'required|numeric|min:1',
|
'disk' => 'required|numeric|min:1',
|
||||||
|
|
Loading…
Reference in New Issue