ExtensionEngine / tailor

Content authoring platform
MIT License
31 stars 10 forks source link

Trim string entered in the 'Tag name' input field while adding a new tag #1041

Open dujes opened 1 year ago

dujes commented 1 year ago

I'm submitting a...

Context

Issue is reproducible while adding a new tag to any course.

Steps to Reproduce

  1. Click on 'Add Tag' icon that is visible in the bottom-right corner of any course card in the catalog
  2. Enter {one char} (for example, one letter) + {space} in the 'Tag name' input field
  3. Save and Observe

Expected Behavior

'The name field must be at least 2 characters' validation message should appear while trying to save the 'Tag' when {one char } + {space} is entered in the 'Tag name' input field.

Current Behavior

It's possible to save 'Tag' with only one visible char while adding a new tag to any course.

Notes

Validation message should disappear when total number of entered chars is ≥ 2.

Screenshots

https://www.loom.com/share/78ac7f89ab53441592a07e0dc0adc095