Repository navigation
feat(ui): inline form validation errors — red border + inline text (v1.17 E) - #45
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Rant
2026-08-17T16:57:17(UI/UE 多角度深化优化), item E — 表单行内校验错误: invalid input should show a red border on the field plus an inline error message below it (small red text), cleared automatically when the user corrects the input — instead of only a toast.Changes
ui/js/app.js:setFieldError(input, msg)— adds.input-error(red border) and inserts a.field-errorspan (red small text) after the field; auto-clears oninputevent;clearFieldError(input)— removes border + text; called when opening/resetting forms.#topup-custom):请输入大于 0 的充值点数#raise-amount/#raise-reason):请输入正整数申请点数/请填写申请原因#dept-form-name/#dept-form-quota):请输入部门名称/请输入正整数月分配点数/ duplicate-name部门「X」已存在#sf-key/#sf-quota): API Key required /请选择厂商 / Plan / 模型并填写有效额度.input.input-error(red border, incl. select),.field-error(block red small text);docs/user-stories.mdv1.17 changelog adds item E;ui/README.md行内校验错误约定 section.Acceptance
Invalid inputs show red border + inline error text on all four forms; typing clears them.
Tests
node --checkon app.js — syntax OKcargo test— 1 passedcargo fmt --check— clean