Skip to content

form error style for input addonAfter slot #6374

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

Closed
1 task
CreateClear opened this issue Mar 21, 2023 · 6 comments
Closed
1 task

form error style for input addonAfter slot #6374

CreateClear opened this issue Mar 21, 2023 · 6 comments

Comments

@CreateClear
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

undefined

Environment

win11, [email protected][email protected]

Reproduction link

Edit on CodeSandbox

Steps to reproduce

当表单项禁用时 包含的 #addonAfter 元素依然会出现红框

What is expected?

当表单项被禁用时完全不进行验证

What is actually happening?

当表单项禁用时 包含的 #addonAfter 元素依然会出现红框


除此之外,在useForm模式下,即使表单项被销毁(v-if="false"),依然会触发验证,demo中已复现

@github-actions github-actions bot changed the title Form使用userForm做表单验证时出现异常 An exception occurs when Form uses userForm for form validation Mar 21, 2023
@tangjinzhou
Copy link
Member

先写 css 覆盖吧

另外 useForm 本来就是 ui 无关的,UI 的销毁和 useForm 的状态没关系

@tangjinzhou tangjinzhou changed the title An exception occurs when Form uses userForm for form validation form error style for input addonAfter slot Mar 23, 2023
@CCherry07
Copy link
Member

CCherry07 commented Mar 23, 2023

你可以自己动态过滤一下,rules或者formState @CreateClear

@CCherry07
Copy link
Member

antdesign 也有这个问题,我看了一下,表单的校验,没有因 input disabled 而过滤校验 @tangjinzhou

@CreateClear
Copy link
Author

@tangjinzhou 好的 感谢

@CreateClear
Copy link
Author

@CCherry07 好的 我试试 感谢

chenxiaofie added a commit to chenxiaofie/ant-design-vue that referenced this issue Mar 28, 2023
* fix(FormITem): add one propType, add disableElement,edit style
chenxiaofie added a commit to chenxiaofie/ant-design-vue that referenced this issue Mar 28, 2023
@chenxiaofie chenxiaofie mentioned this issue Mar 28, 2023
12 tasks
Copy link

github-actions bot commented Apr 4, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants