Skip to content

Event Type form allows " " as a valid title #23218

@vitormrmonteiro

Description

@vitormrmonteiro

Issue Summary

Creating a new Event Type succeeds when the Title field contains only whitespace (e.g., " "). The value is not trimmed before validation, so an effectively empty title is accepted. This leads to Event Types with blank titles in the UI and database.

Steps to Reproduce

  1. Log In
  2. Go to Event Types
  3. Click on "Create"
  4. Add a whitespace in the "Title" field
  5. Enter a slug in the "URL" field
  6. Click "Continue"
  7. A new Event Type is created successfully

This is considered a bug because an event type title should not be empty, but the code is not enforcing the title to be trimmed first.

Actual Results

  • When entering a new event type, it is successfully saving when the user enters a whitespace into the title field

Expected Results

  • When entering a new event type, if the user enters a whitespace into the title field, the system should display an error saying that "At least 1 character is required".

Technical details

  • Node.js version - v20.18.1

Evidence

Metadata

Metadata

Assignees

No one assigned

    Labels

    event-typesarea: event types, event-types🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions