mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Check for uniqueness constraint
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
41778980bc
commit
6a91d4d19e
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue