lekoala / bootstrap5-tags

Replace select[multiple] with nices badges for Bootstrap 5
MIT License
150 stars 35 forks source link

Input invalid when there's one item and not entered. #79

Closed JobberRT closed 1 year ago

JobberRT commented 1 year ago

Thanks for this awesome Bootstrap5&Vanlina JS library!!! Here's a problem when I using it: Tags.js see single input with not entered as invalid.

Example:

Invalid(not exist in new FormData or direct submit form) image

Valid image

I think Tags.js gives people the chance to input muliple value, but they should still have the ability to input a single value without additional operation(after input the value, seperat it by comma or blank or enter to make it a tag).

Hope Tags.js can add this simple behavior to automatically turn single value to a valid tag(Or just make it appeal when create a FormData or submit the form)

lekoala commented 1 year ago

isn't that what 'addOnBlur' setting does?

JobberRT commented 1 year ago

Ohhh, Sorry for this noobie question, I'm new to frontend and only know "focus", didn't know "blur"