Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新建组织、联盟、网络、通道时,输入名字提示错误 #68

Closed
marsdawe opened this issue Mar 7, 2023 · 0 comments · Fixed by #71
Closed

新建组织、联盟、网络、通道时,输入名字提示错误 #68

marsdawe opened this issue Mar 7, 2023 · 0 comments · Fixed by #71

Comments

@marsdawe
Copy link

marsdawe commented Mar 7, 2023

1、新建组织,联盟、网络、通道时,输入名字提示“XX名称是3~20个大小写字母、数字、下划线组成”有误,根据之前规则,只能输入小写字母,应去掉“大写”提示。
2、当用户输入大写字母时,提交新信息报错。
应在输入大写字母时需要作校验,显示1所示正确提示。

报错信息如下:

{

"message": "HTTP request failed",

"locations": [

{

  "line": 2,

  "column": 3

}

],

"path": [

"organizationCreate"

],

"extensions": {

"code": "INTERNAL_SERVER_ERROR",

"exception": {

  "response": {

    "statusCode": 422,

    "body": {

      "kind": "Status",

      "apiVersion": "v1",

      "metadata": {},

      "status": "Failure",

      "message": "Organization.ibp.com \"Orga1\" is invalid: metadata.name: Invalid value: \"Orga1\": 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]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')",

      "reason": "Invalid",

      "details": {

        "name": "Orga1",

        "group": "ibp.com",

        "kind": "Organization",

        "causes": [

          {

            "reason": "FieldValueInvalid",

            "message": "Invalid value: \"Orga1\": 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]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')",

            "field": "metadata.name"

          }

        ]

      },

      "code": 422

    },

    "headers": {

      "cache-control": "no-cache, private",

      "content-length": "900",

      "content-type": "application/json",

      "date": "Tue, 07 Mar 2023 05:30:55 GMT",

      "x-kubernetes-pf-flowschema-uid": "17c72ac8-56d3-43c2-b506-88369b3dfd6c",

      "x-kubernetes-pf-prioritylevel-uid": "0fbaace5-3e9b-4c80-933e-7035f7939373",

      "connection": "close"

    },

    "request": {

      "uri": {

        "protocol": "https:",

        "slashes": true,

        "auth": null,

        "host": "172.22.96.146:9443",

        "port": "9443",

        "hostname": "172.22.96.146",

        "hash": null,

        "search": null,

        "query": null,

        "pathname": "/apis/ibp.com/v1beta1/organizations",

        "path": "/apis/ibp.com/v1beta1/organizations",

        "href": "https://172.22.96.146:9443/apis/ibp.com/v1beta1/organizations"

      },

      "method": "POST",

      "headers": {

        "Accept": "application/json",

        "Authorization": "Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjIyOTNlZjY4OTU5N2M3MzM2Y2MyZWJmZTMwMWViODgwMDhlYWU4OGMifQ.eyJpc3MiOiJodHRwczovL3BvcnRhbC4xNzIuMjIuOTYuMjA5Lm5pcC5pby9vaWRjIiwic3ViIjoiQ2dodFlYSnpaR0YzWlJJR2F6aHpZM0prIiwiYXVkIjoiYmZmLWNsaWVudCIsImV4cCI6MTY3ODIzOTM0MywiaWF0IjoxNjc4MTUyOTQzLCJhdF9oYXNoIjoiTEpaRGtmdHphQldDUlBMZFltS2s3USIsImNfaGFzaCI6Iks

加载更多

@marsdawe marsdawe changed the title 新建组织、联盟、网络时,输入名字提示错误 新建组织、联盟、网络、通道时,输入名字提示错误 Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant