Skip to content

[BUG] Creating category with Name Consisting Only of Spaces is possible  #84

Description

@Banowany

Describe the bug
Creating a category with a name consisting only of spaces is possible, which should not be allowed. This category appears in the list of categories, but clicking on it is not possible. As a result, there is no way to enter the category editing mode without resorting to HTML code. A similar issue occurs on the storefront when setting the category as visible.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the category creator (Admin panel -> Categories -> New Categories).
  2. Enter a required data but category name consisting only of spaces.
  3. Save the category.
  4. Navigate to the list of categories and observe the created category.
  5. Attempt to click on the category.

Expected behavior
Creating a category with a name consisting only of spaces should be prevented.

Screenshots
obraz
obraz
categoryPanel.webm

Background:

  • NodeJS 20.11.0
  • Postgres 13.12 (as Docker Container)
  • ShopMost 1d95be0 (last working)
  • OS: Ubuntu 22.04
  • Browser Opera, Firefox

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions