Skip to content

Trailing Spaces in Size Input Fields Cause Submission Error #10627

@rosi-shapeblue

Description

@rosi-shapeblue

problem

Description

When selecting a custom disk offering while creating a new volume or VM in CloudStack, entering a size value with a trailing space (e.g., "10 ") causes the API to fail with the error message "Unable to execute API command createVolume due to invalid value 10 for parameter size".

The error message is misleading because the value itself is actually valid, but the system does not automatically trim the trailing space, causing the failure. This results in a submission error when the system attempts to process the request.

versions

CloudStack 4.19.0.2
CloudStack 4.20.0.0

The steps to reproduce the bug

  1. Navigate to Storage -> Volumes -> Create volume
  2. Add new Volume
  3. Select "Custom disk offering" -> fill in all mandatory fields
  4. In the Size input field -> enter a value with a trailing space, e.g., "10 " (without quotes).
  5. Submit the form

Actual Result

The size field includes a trailing space, causing the backend to reject the request with the error message about the invalid size. This results in a notification banner on the frontend indicating a submission error.

Image

What to do about it?

Expected Result

The system should automatically trim spaces from the input field before submission, preventing the error message. The size value should be considered valid once the space is trimmed, and the volume creation should proceed as expected.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions