rancher / capi-ui-extension

Rancher Extension used in rancher/dashboard for Rancher Turtles CAPI Provisioning UI.
Apache License 2.0
8 stars 7 forks source link

Need to update name validation when creating a cluster to match rules from the Backend #62

Open eva-vashkevich opened 1 month ago

eva-vashkevich commented 1 month ago

Steps to reproduce:

  1. Start creating a new cluster
  2. Enter "test_test" as a name
  3. Fill in other required fields and press 'Create'
  4. "Cluster.cluster.x-k8s.io "test_test" is invalid: metadata.name: Invalid value: "test_test": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(.a-z0-9?)*') is thrown

Expected behavior: Validation should not allow values that do not conform to this rule.