From 6f2f7aed479d7141856011038677680313bbe6aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=A5=95?= Date: Wed, 9 May 2018 13:58:12 +0800 Subject: [PATCH] FormItem: add clearValidate (#11076) --- examples/docs/en-US/form.md | 1 + examples/docs/es/form.md | 1 + examples/docs/zh-CN/form.md | 1 + types/form-item.d.ts | 6 ++++++ 4 files changed, 9 insertions(+) diff --git a/examples/docs/en-US/form.md b/examples/docs/en-US/form.md index 69ac74e45..f24386d63 100644 --- a/examples/docs/en-US/form.md +++ b/examples/docs/en-US/form.md @@ -884,3 +884,4 @@ All components in a Form inherit their `size` attribute from that Form. Similarl | Method | Description | Parameters | | ---- | ---- | ---- | | resetField | reset current field and remove validation result | — | +| clearValidate | remove validation status of the field | - diff --git a/examples/docs/es/form.md b/examples/docs/es/form.md index fe95815a9..b73e0d457 100644 --- a/examples/docs/es/form.md +++ b/examples/docs/es/form.md @@ -889,3 +889,4 @@ Todos los componentes de un formulario heredan su atributo `size`. De manera sim | Metodo | Descripción | Parametros | | ---------- | ---------------------------------------- | ---------- | | resetField | restablecer campo actual y eliminar resultado de validación | — | +| clearValidate | remove validation status of the field | - | diff --git a/examples/docs/zh-CN/form.md b/examples/docs/zh-CN/form.md index 92ddf6336..8912b8879 100644 --- a/examples/docs/zh-CN/form.md +++ b/examples/docs/zh-CN/form.md @@ -872,3 +872,4 @@ W3C 标准中有如下[规定](https://www.w3.org/MarkUp/html-spec/html-spec_8.h | 方法名 | 说明 | 参数 |---------- |-------------- | -------------- | resetField | 对该表单项进行重置,将其值重置为初始值并移除校验结果 | - +| clearValidate | 移除该表单项的校验结果 | - diff --git a/types/form-item.d.ts b/types/form-item.d.ts index 239ce9294..fdbd68e72 100644 --- a/types/form-item.d.ts +++ b/types/form-item.d.ts @@ -28,4 +28,10 @@ export declare class ElFormItem extends ElementUIComponent { /** Controls the size of components in this form */ size: ElementUIComponentSize + + /** Reset current field and remove validation result */ + resetField (): void + + /** Remove validation status of the field */ + clearValidate (): void }