diff --git a/app/Models/CustomFieldset.php b/app/Models/CustomFieldset.php index bcbe0b81d9..1cf1807d85 100644 --- a/app/Models/CustomFieldset.php +++ b/app/Models/CustomFieldset.php @@ -83,7 +83,11 @@ class CustomFieldset extends Model if (($field->field_encrypted != '1') || (($field->field_encrypted == '1') && (Gate::allows('admin')))) { - $rule[] = ($field->pivot->required == '1') ? 'required' : 'nullable'; + $rule[] = ($field->pivot->required == '1') ? 'required' : 'nullable'; + } + + if ($field->is_unique == '1') { + $rule[] = 'unique'; } array_push($rule, $field->attributes['format']);