zjncs opened a new issue, #5621:
URL: https://github.com/apache/rocketmq-dashboard/issues/5621

   ## Description
   
   `CreateNameserverRegistryDTO` enforces length caps:
   
   ```java
   @NotBlank @Size(max = 128)  private String name;
   @NotBlank @Size(max = 512)  private String namesrvAddr;
   @Size(max = 128)            private String k8sNamespace;
   @Size(max = 128)            private String k8sId;
   ```
   
   but the registry modal's inputs (`web/src/pages/cluster/index.tsx`, NS 管理 
tab → 新建 NameServer, ~1915-1939) have only `required` rules and **no 
`maxLength`** — a user can type a 129-character name or a 513-character address 
list and submit, only to receive a bare server-side 400 (`name must not exceed 
128 characters`) with their input still in the form.
   
   Backend constraint pinned by a passing contract test (129-char name rejected 
/ 128 accepted / 513-char addr rejected — `NameserverRegistrySizeContractTest`, 
3/3).
   
   ## Expected behavior
   
   Cap the free-text inputs at the DTO limits with a visible counter: name 128, 
namesrvAddr 512, k8sNamespace 128 (`k8sId` is options-bound from system values 
and `description` has no cap — both untouched).
   
   ## Environment
   
   - branch: master (0228dad5)
   - files: `web/src/pages/cluster/index.tsx` (NS registry modal)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to