Skip to content

Omnichannel → Livechat Triggers: Whitespace-only values accepted in Name, Description and Message fields #38512

@Codersintu

Description

@Codersintu

Description:

While testing the Omnichannel → Livechat Triggers creation form, I noticed that the required text fields accept whitespace-only values.
Currently, entering only spaces (" ") in Name, Description, or Message enables the Save button and allows the trigger to be created successfully.

This results in invalid/empty-looking triggers being stored.

Steps to reproduce:

  1. Go to Settings → Omnichannel → Livechat Triggers
  2. Click Create trigger
  3. Enter spaces only (" ") in:
    i) Name
    ii) Description
    iii) Message
  4. Click Save

Expected behavior:

 1. Fields should be trimmed before validation
 2.  Whitespace-only values should be treated as empty

Actual behavior:

Trigger is created successfully with whitespace-only values

Server Setup Information:

  • Version of Rocket.Chat Server: develop branch (local build)
  • License Type: Community
  • Number of Users: 1
  • Operating System: Linux (GitHub Codespaces)
  • Deployment Method: yarn dsv
  • Number of Running Instances: 1
  • DB Replicaset Oplog: disabled
  • NodeJS Version: v22.16.0

Client Setup Information

  • Desktop App or Browser Version: Chrome
  • Operating System: Windows/Linux

Additional context

This appears to be a frontend validation issue. Inputs are not trimmed before validation, allowing whitespace-only values to pass required checks.

whitespace.error.1.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions