diff --git a/app/Forms/CommonForm.php b/app/Forms/CommonForm.php index b713e43..16bd558 100644 --- a/app/Forms/CommonForm.php +++ b/app/Forms/CommonForm.php @@ -380,7 +380,6 @@ abstract class CommonForm } $this->_validation->setRules($dynamicRules); - if (!$this->_validation->run($formDatas)) { $errors = $this->_validation->getErrors(); throw new RuntimeException(implode("\n", $errors)); diff --git a/app/Forms/Equipment/ServerForm.php b/app/Forms/Equipment/ServerForm.php index 6044379..b669b58 100644 --- a/app/Forms/Equipment/ServerForm.php +++ b/app/Forms/Equipment/ServerForm.php @@ -71,6 +71,10 @@ class ServerForm extends EquipmentForm public function getFormRule(string $field, array $formRules): array { switch ($field) { + case 'clientinfo_uid': + case 'serviceinfo_uid': + $formRules[$field] = "required|numeric"; + break; case "switchinfo_uid": $formRules[$field] = sprintf("permit_empty|numeric%s", in_array($this->formAction, ["create", "create_form"]) ? "|is_unique[{$this->getAttribute('table')}.{$field}]" : ""); break;