Check for uniqueness constraint

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-02-16 13:46:22 -08:00
parent 41778980bc
commit 6a91d4d19e

View file

@ -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']);