mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 05:54:36 -04:00
Validation for task rate
This commit is contained in:
parent
957556b8d0
commit
3ab899f58e
@ -61,7 +61,7 @@ class UpdateTaskRequest extends Request
|
|||||||
}
|
}
|
||||||
|
|
||||||
$rules['hash'] = 'bail|sometimes|string|nullable';
|
$rules['hash'] = 'bail|sometimes|string|nullable';
|
||||||
|
$rules['rate'] = 'bail|numeric';
|
||||||
$rules['time_log'] = ['bail', function ($attribute, $values, $fail) {
|
$rules['time_log'] = ['bail', function ($attribute, $values, $fail) {
|
||||||
|
|
||||||
if(is_string($values)) {
|
if(is_string($values)) {
|
||||||
@ -137,6 +137,9 @@ class UpdateTaskRequest extends Request
|
|||||||
$input['time_log'] = json_encode([]);
|
$input['time_log'] = json_encode([]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$input['rate'] = isset($input['rate']) ? $input['rate'] : 0;
|
||||||
|
|
||||||
$this->replace($input);
|
$this->replace($input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user