Change validation rule

Change validation rule to
This commit is contained in:
Charles Morgan 2020-04-23 14:59:47 -04:00
parent 82dd7dc8e3
commit e3303f7a60
1 changed files with 2 additions and 1 deletions

View File

@ -41,6 +41,7 @@ class Database extends Model
protected $casts = [ protected $casts = [
'server_id' => 'integer', 'server_id' => 'integer',
'database_host_id' => 'integer', 'database_host_id' => 'integer',
'max_connections' => 'integer',
]; ];
/** /**
@ -51,7 +52,7 @@ class Database extends Model
'database_host_id' => 'required|exists:database_hosts,id', 'database_host_id' => 'required|exists:database_hosts,id',
'database' => 'required|string|alpha_dash|between:3,100', 'database' => 'required|string|alpha_dash|between:3,100',
'username' => 'string|alpha_dash|between:3,100', 'username' => 'string|alpha_dash|between:3,100',
'max_connections' => 'nullable', 'max_connections' => 'nullable|integer',
'remote' => 'required|string|regex:/^[0-9%.]{1,15}$/', 'remote' => 'required|string|regex:/^[0-9%.]{1,15}$/',
'password' => 'string', 'password' => 'string',
]; ];