Skip to content

[Bug]: Database name validation fails on trailing whitespace without a clear error message #7609

Description

@MishraSakshi01

What happened?

Cloud database creation rejects valid name when input has leading whitespace

When creating a database in Chroma Cloud, entering testDB (with an accidental leading space) produces:

Expected a name containing 3-512 characters from [a-zA-Z0-9._-], starting and ending with a character in [a-zA-Z0-9]. Got: testDB

The displayed value appears as testDB, making the actual cause (leading whitespace) difficult to identify.

Expected behavior: Trim leading/trailing whitespace before validation, or provide an explicit error indicating that whitespace is not allowed.

Actual behavior: Generic validation error that doesn't make the invisible whitespace apparent.

This is particularly confusing because testDB itself satisfies the validation rule.

As a developer, I'd also mention that trimming before validation is probably the better UX, while preserving the stricter validation for whitespace inside the name.

Versions

Chroma Cloud Web UI

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions