Validation errors not showing up for type day
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- react, typescript
- 领域
- frontend
调研方向
从链接的 CodeSandbox 复现开始,在输入和提交时复现缺失的 day-component 错误。跟踪 day-component 的验证错误渲染和类应用,并将其与 textfield 的行为进行比较。在无需 workaround 的情况下,自定义错误在两个流程中都可见即视为完成。
由索引模型根据 Issue 内容生成。
描述
I have a form with two components, one of type day, with day, month and year required, and one of type textfield, required. Both have a custom error message.
Both while typing and on submission, errors are not shown for the day component. I tried calling the submit function and I noticed the error is actually thrown. It seems like the library is not adding the correct class to the element in order for the error to be shown.
To Reproduce
Steps to reproduce the behavior:
- Go to repro: https://codesandbox.io/p/sandbox/modest-worker-mtztn2
- Click on "verify"
- See that error on day is not shown
- Click on "vertify with workaround"
- See that error on day is now shown thanks to the ugly workaround I implemented
Expected behavior
Errors on day component should be shown both while typing and on submit
Screenshots
Without workaround:
With workaround:
Desktop (please complete the following information):
- OS: Tested on Windows 10 and macOS 14.5
- Browser chromium based
- Version 127.0.6533.73
Additional context
The version of the libs in the repro are the exact ones I use in my project
- 主要语言
- TypeScript
- 星标
- 371
- 派生
- 309
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
formio/react 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 64/100
-
难度 3/5 1-2 天 新手友好度 55/100
-
onChange `modified` property remains false when file component is updated可能重新可做 @ZenMasterJacob20011 于 293 天前认领,目前没有进行中的 PR。 未关闭
-
FormBuilder onChange callback not triggered when options prop is provided可能重新可做 @Victoriya25 于 335 天前认领,目前没有进行中的 PR。 未关闭
-
FormBuilder with OnChange broke textarea可能重新可做 @lane-formio 于 307 天前认领,目前没有进行中的 PR。 未关闭
相似的 Issue
-
bot:ai-assisted component:platform-js status:untriaged
难度 1/5 1 小时以内 新手友好度 74/100
midnightntwrk/platform-js#38 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
ranxianglei/billion-context#7068 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
mybigday/whisper.rn#348 ·
-
enhancement severity:low
难度 2/5 1-3 小时 新手友好度 82/100
Battle-Cattle/BCUK-Bot-4#1075 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
ilan-pinto/roaring-lions#1552 ·
维护者通常 1 天内回复