Skip to content

Improve API Error Message for Collection Alias Validation #11738

@ofahimIQSS

Description

@ofahimIQSS

Description:
When attempting to create a collection with an alias consisting only of numbers (e.g., 888), the API returns a technical error message:

"Identifier is not valid. Valid characters are a-Z, 0-9, '_', and '-'."

This message is misleading to the end user because it suggests that numbers are allowed, but in reality, an alias must contain at least one letter.

Proposed Fix:

Update backend validation logic to return a clearer message, e.g.:

"Invalid alias. Use letters (A–Z, a–z), numbers (0–9), underscores (_), or hyphens (-), and include at least one letter."

Steps to Reproduce:

  1. Go to API endpoint for creating a Dataverse collection.
  2. Set alias to a numeric-only string (e.g., 888).
  3. Observe returned error message.

Expected Result:
A user-friendly and accurate error message explaining that numeric-only aliases are not allowed.

Screen.Recording.2025-08-12.at.3.46.41.PM.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions