Error: "validation error on field 'name'" while disabling/deleting an Organization in VCF Automation 9.x
search cancel

Error: "validation error on field 'name'" while disabling/deleting an Organization in VCF Automation 9.x

book

Article ID: 442977

calendar_today

Updated On:

Products

VCF Automation

Issue/Introduction

In VCF Automation 9.x, users may find themselves unable to delete or modify an Organization that was created with capital letters or spaces in the name. When attempting to disable the Organization through the Provider Portal or API, the task fails with a validation error.

Below error message can be observed :

validation error on field 'name': must match "^[a-zA-Z0-9_\-\.\!\'\(\),$]+$"

Environment

VCF Automation 9.x

Cause

The management API applies a restrictive validation pattern that blocks these characters during the "Disable" or "Delete" workflows.

Resolution

Rename the organization to a valid format via an API call before attempting deletion.

Important: Take a backup of the VCF Automation appliance before making any changes.

  1. Open the VCF Automation Provider Portal.

  2. Open the browser Developer Tools by right-clicking on a blank area of the page and selecting Inspect.

  3. Select the Network tab.

  4. Browse to the Organization that needs to be deleted.

  5. Clear the Network log by pressing Ctrl + L.

  6. Click Disable for the Organization.

  7. In the Disable Organization popup, select Disable

  8. Locate the failed PUT request that begins with:

     urn:vcloud:org:<org-id>

    The request typically returns an HTTP 400 status.

  9.  Right-click the failed request and select:

    Copy > Copy as cURL (bash)

  10. Paste the copied cURL command into a text editor. 

  11. Modify the Organization name in the request payload:

    "name":"<Valid Org Name>"

    Use only alphanumeric characters or the following supported characters: "^[a-zA-Z0-9_\-\.\!\'\(\),$]+$"

  12. SSH to one of the VCF Automation nodes. 

  13. Execute the modified cURL command using the corrected Organization name.
    Note: Append -k to the command if you need to bypass certificate warnings.

  14. Return to the VCF Automation UI and refresh the page.

  15. Delete the Organization using the Delete button in the UI.