gpt4 book ai didi

Angular 5 : Validating disabled fields

转载 作者:行者123 更新时间:2023-12-04 11:45:36 25 4
gpt4 key购买 nike

我找到了 this post但它不能解决我的问题。我无法验证禁用 FormControls 的简单表单。我确实在这里做了一个 stackblitz 示例,请查看我的代码并验证如果名称控件被禁用,则无法验证它的值。
Stackblitz code
先感谢您。

最佳答案

Solution by @Eliseo :

If you want not loose the validate you can use [attr.disabled]="condition ? true : null" (or any condition). This give your control an apparence of disabled but still is "validating".

关于 Angular 5 : Validating disabled fields,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54522845/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com