Skip to content

Commit

Permalink
fix: Fixed MediaItem maxLength option validation
Browse files Browse the repository at this point in the history
Closes #66
  • Loading branch information
Alorel committed Nov 29, 2022
1 parent 144c124 commit c000021
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/option-types/media-item-option.mts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function validateMulti<T extends MediaSelectable>(
opt: MediaItemNodeOption,
values: Obj<any>
) {
if (multi.maxLength && items.length >= multi.maxLength) {
if (multi.maxLength && items.length > multi.maxLength) {
errors.push(`Too many items! Select ${multi.maxLength} at most.`);
}

Expand Down

0 comments on commit c000021

Please sign in to comment.