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

@ -86,6 +86,10 @@ class CustomFieldset extends Model
$rule[] = ($field->pivot->required == '1') ? 'required' : 'nullable';
}
if ($field->is_unique == '1') {
$rule[] = 'unique';
}
array_push($rule, $field->attributes['format']);
$rules[$field->db_column_name()] = $rule;
}