From 68e1c4f4e2e1faf2e6458c74f7aef11614fa8c37 Mon Sep 17 00:00:00 2001 From: minchodang Date: Mon, 19 Aug 2024 21:50:07 +0900 Subject: [PATCH 1/2] Docs: claearErrors.mdx --- src/content/docs/useform/clearerrors.mdx | 30 ++++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/content/docs/useform/clearerrors.mdx b/src/content/docs/useform/clearerrors.mdx index c2d6bb318..9581d19f2 100644 --- a/src/content/docs/useform/clearerrors.mdx +++ b/src/content/docs/useform/clearerrors.mdx @@ -1,39 +1,39 @@ --- title: clearErrors -description: Clear form errors +description: 폼 에러 제거 sidebar: apiLinks --- ## \ `clearErrors:` (name?: string | string[]) => void -This function can manually clear errors in the form. +이 함수는 폼의 에러를 직접 제거할 수 있습니다. ### Props --- -| Type | Description | Example | -| ------------------------------ | ----------------------- | --------------------------------------- | -| undefined | Remove all errors. | `clearErrors()` | -| string | Remove single error. | `clearErrors("yourDetails.firstName")` | -| string[] | Remove multiple errors. | `clearErrors(["yourDetails.lastName"])` | +| Type | Description | Example | +| ------------------------------ | --------------- | --------------------------------------- | +| undefined | 모든 에러 제거. | `clearErrors()` | +| string | 단일 에러 제거. | `clearErrors("yourDetails.firstName")` | +| string[] | 여러 에러 제거. | `clearErrors(["yourDetails.lastName"])` | -- `undefined`: reset all errors -- `string`: reset the error on a single field or by key name. +- `undefined`: 모든 에러를 초기화합니다. +- `string`: 단일 필드 또는 키 이름으로 에러를 초기화합니다. ```javascript register("test.firstName", { required: true }) register("test.lastName", { required: true }) - clearErrors("test") // will clear both errors from test.firstName and test.lastName - clearErrors("test.firstName") // for clear single input error + clearErrors("test") // test.firstName 및 test.lastName의 모든 에러를 제거 + clearErrors("test.firstName") // 단일 입력 에러 제거 ``` -- `string[]`: reset errors on the given fields +- `string[]`: 주어진 필드의 오류를 초기화합니다. - + -- This will not affect the validation rules attached to each inputs. -- This method doesn't affect validation rules or `isValid` formState. +- 이 메소드는 각 입력 필드에 연결된 유효성 검사 규칙에는 영향을 주지 않습니다. +- 이 메소드는 유효성 검사 규칙이나 `isValid` formState에는 영향을 미치지 않습니다. From 41522efcb4a28adbfd6cb66ffd6bf6e9bfb0a721 Mon Sep 17 00:00:00 2001 From: minchodang Date: Wed, 29 Jan 2025 14:24:20 +0900 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=EB=A6=AC=EB=B7=B0=20=EB=B0=98?= =?UTF-8?q?=EC=98=81=20=EB=B2=88=EC=97=AD=20=EC=88=98=EC=A0=95(=EB=8B=A8?= =?UTF-8?q?=EC=9D=BC=20->=20=ED=95=98=EB=82=98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/content/docs/useform/clearerrors.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/content/docs/useform/clearerrors.mdx b/src/content/docs/useform/clearerrors.mdx index 9581d19f2..6b0b28310 100644 --- a/src/content/docs/useform/clearerrors.mdx +++ b/src/content/docs/useform/clearerrors.mdx @@ -12,20 +12,20 @@ sidebar: apiLinks --- -| Type | Description | Example | -| ------------------------------ | --------------- | --------------------------------------- | -| undefined | 모든 에러 제거. | `clearErrors()` | -| string | 단일 에러 제거. | `clearErrors("yourDetails.firstName")` | -| string[] | 여러 에러 제거. | `clearErrors(["yourDetails.lastName"])` | +| Type | Description | Example | +| ------------------------------ | ----------------- | --------------------------------------- | +| undefined | 모든 에러 제거. | `clearErrors()` | +| string | 하나의 에러 제거. | `clearErrors("yourDetails.firstName")` | +| string[] | 여러 에러 제거. | `clearErrors(["yourDetails.lastName"])` | - `undefined`: 모든 에러를 초기화합니다. -- `string`: 단일 필드 또는 키 이름으로 에러를 초기화합니다. +- `string`: 하나의 필드 또는 키 이름으로 에러를 초기화합니다. ```javascript register("test.firstName", { required: true }) register("test.lastName", { required: true }) clearErrors("test") // test.firstName 및 test.lastName의 모든 에러를 제거 - clearErrors("test.firstName") // 단일 입력 에러 제거 + clearErrors("test.firstName") // 하나의 입력 에러 제거 ``` - `string[]`: 주어진 필드의 오류를 초기화합니다.