Fix command validation rules

This commit is contained in:
James Brooks
2016-10-19 12:29:35 +01:00
parent ebf3c8656f
commit 468b2a0b7a
14 changed files with 70 additions and 72 deletions

View File

@@ -98,17 +98,17 @@ final class UpdateMetricCommand
* @var string[]
*/
public $rules = [
'name' => 'string',
'suffix' => 'string',
'description' => 'string',
'display_chart' => 'bool',
'default_value' => 'numeric',
'calc_type' => 'int|in:0,1',
'display_chart' => 'int',
'places' => 'numeric|between:0,4',
'default_view' => 'numeric|between:0,4',
'threshold' => 'numeric|between:0,10',
'order' => 'int',
'name' => 'nullable|string',
'suffix' => 'nullable|string',
'description' => 'nullable|string',
'display_chart' => 'nullable|bool',
'default_value' => 'nullable|numeric',
'calc_type' => 'nullable|int|in:0,1',
'display_chart' => 'nullable|int',
'places' => 'nullable|numeric|between:0,4',
'default_view' => 'nullable|numeric|between:0,4',
'threshold' => 'nullable|numeric|between:0,10',
'order' => 'nullable|int',
];
/**