Skip to content

A free open source IT asset/license management system

Fixes #4067 - Make unrequired custom fields nullable

snipea4b30279ee71
diff --git a/app/Models/CustomFieldset.php b/app/Models/CustomFieldset.php
index c89d3dd312..94188cfb6e 100644
--- a/app/Models/CustomFieldset.php
+++ b/app/Models/CustomFieldset.php
@@ -49,6 +49,8 @@ class CustomFieldset extends Model
(($field->field_encrypted =='1') && (Gate::allows('admin')) )) {
if ($field->pivot->required) {
$rule[]="required";
+ } else {
+ $rule[]="nullable";
}
}