From a4b30279ee719ce59ff5b9e052a18c6b294fa312 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 29 Sep 2017 03:30:13 -0700 Subject: [PATCH] Fixes #4067 - Make unrequired custom fields nullable --- app/Models/CustomFieldset.php | 2 ++ 1 file changed, 2 insertions(+) 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"; } }