|
|
@@ -25,15 +25,6 @@ class DiskSizeValidator extends BaseValidator
|
|
|
|
|
|
protected function validate($data, $additionalData = null)
|
|
|
{
|
|
|
-
|
|
|
- logModuleCall(
|
|
|
- 'ProxmoxCloudVps',
|
|
|
- __FUNCTION__,
|
|
|
- $this->minValue . $this->maxValue,
|
|
|
- 'Debug',
|
|
|
- $data
|
|
|
- );
|
|
|
-
|
|
|
if (!$this->required && empty($data))
|
|
|
{
|
|
|
return true;
|
|
|
@@ -50,6 +41,15 @@ class DiskSizeValidator extends BaseValidator
|
|
|
} else {
|
|
|
$this->maxValue = $diskResource->free();
|
|
|
}
|
|
|
+
|
|
|
+ logModuleCall(
|
|
|
+ 'ProxmoxCloudVps',
|
|
|
+ __FUNCTION__,
|
|
|
+ $this->minValue . $this->maxValue,
|
|
|
+ 'Debug',
|
|
|
+ $data
|
|
|
+ );
|
|
|
+
|
|
|
if ($this->maxValue > $diskResource->getMax()) {
|
|
|
$this->addValidationError('PleaseProvideANumericValueBetween', false, ['minValue' => $this->minValue, 'maxValue' => $diskResource->getMax()]);
|
|
|
return false;
|