Ionic Framework 3 和 Angular 4 中的表单经过验证 <ion-input/>
和<ion-textareas/>
自动地。一旦我模糊了输入字段,它就会得到验证,并且边框颜色会变为绿色(在我的情况)。
<ion-item margin-top>
<ion-label stacked>Form Label</ion-label>
<ion-textarea type="text" rows="6" [(ngModel)]="variable"></ion-textarea>
</ion-item>
是否可以在 Ionic 3 中禁用自动表单验证?
注意:如果我删除 [(ngModel)]="variable"
,验证将被忽略。
最佳答案
更改而不是在src/theme/variables.scss
内添加以下代码行:
// Ionic variables override
$text-input-ios-show-focus-highlight: false;
$text-input-md-show-focus-highlight: false;
$text-input-wp-show-focus-highlight: false;
会有一个缺点。删除焦点高光时,您将失去所有类型的高光。
注意:原始答案 sebaferreras : How to remove default color in input type?
关于javascript - 如何在 Ionic 3 和 Angular 4 中禁用表单验证?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48662816/