Skip to content

Close #801 #802

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

Merged
merged 11 commits into from
Jul 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/data/V5/en/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1110,11 +1110,7 @@ onChange={{([ { checked } ]) => ({ checked })}}`}
AntD
</a>{" "}
and{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
. This wrapper component will make it easier for you to work with
Expand Down
6 changes: 1 addition & 5 deletions src/data/V5/es/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -872,11 +872,7 @@ export default {
AntD
</a>{" "}
y{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
. Este componente los envuelve para que trabajar con ellos sea más
Expand Down
6 changes: 1 addition & 5 deletions src/data/V5/jp/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -912,11 +912,7 @@ onChange={{([ { checked } ]) => ({ checked })}}`}
AntD
</a>{" "}
、{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
などの外部の制御された UI{" "}
Expand Down
6 changes: 1 addition & 5 deletions src/data/V5/kr/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1088,11 +1088,7 @@ onChange={{([ { checked } ]) => ({ checked })}}`}
AntD
</a>{" "}
혹은{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>{" "}
와 같은 제어 컴포넌트를 사용하는 외부 라이브러리와 조합하여 사용하는
Expand Down
6 changes: 1 addition & 5 deletions src/data/V5/pt/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -895,11 +895,7 @@ export default {
AntD
</a>{" "}
e{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
. Este componente irá fazer sua vida mais simples.
Expand Down
6 changes: 1 addition & 5 deletions src/data/V5/ru/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1110,11 +1110,7 @@ React.useEffect(() => {
AntD
</a>{" "}
и{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
. Этот компонент-обёртка сделает вашу жизнь проще при работе с ними.
Expand Down
6 changes: 1 addition & 5 deletions src/data/V5/zh/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -859,11 +859,7 @@ export default {
AntD
</a>{" "}
和{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
。 这个包装器组件将使您的工作更轻松。
Expand Down
6 changes: 1 addition & 5 deletions src/data/V6/en/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1553,11 +1553,7 @@ React.useEffect(() => {
AntD
</a>{" "}
and{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
. This wrapper component will make it easier for you to work with
Expand Down
6 changes: 1 addition & 5 deletions src/data/V6/es/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -871,11 +871,7 @@ export default {
AntD
</a>{" "}
y{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
. Este componente los envuelve para que trabajar con ellos sea más
Expand Down
6 changes: 1 addition & 5 deletions src/data/V6/jp/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -894,11 +894,7 @@ validate: (value) => value === getValues('firstName');"
AntD
</a>{" "}
、{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
などの外部の制御された UI{" "}
Expand Down
6 changes: 1 addition & 5 deletions src/data/V6/kr/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1136,11 +1136,7 @@ React.useEffect(() => {
AntD
</a>{" "}
혹은{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>{" "}
와 같은 제어 컴포넌트를 사용하는 외부 라이브러리와 조합하여 사용하는
Expand Down
6 changes: 1 addition & 5 deletions src/data/V6/pt/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -879,11 +879,7 @@ validate: (value) => value === getValues('firstName');"
AntD
</a>{" "}
e{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
. Este componente irá fazer sua vida mais simples.
Expand Down
6 changes: 1 addition & 5 deletions src/data/V6/ru/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1170,11 +1170,7 @@ validate: (value) => value === getValues('firstName');"
AntD
</a>{" "}
и{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
. Этот компонент-обёртка сделает вашу жизнь проще при работе с ними.
Expand Down
6 changes: 1 addition & 5 deletions src/data/V6/zh/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -939,11 +939,7 @@ export default {
AntD
</a>{" "}
和{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
。 这个包装组件将使您的工作更轻松。
Expand Down
42 changes: 42 additions & 0 deletions src/data/en/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1927,6 +1927,48 @@ setValue('notRegisteredInput', { test: '1', test2: '2' }); // ✅ sugar syntax t
</p>
</td>
</tr>
<tr>
<td>
<code>rules</code>
</td>
<td>
<code className={typographyStyles.typeText}>Object</code>
</td>
<td></td>
<td>
<p>
The same validation <code>rules</code> API as for{" "}
<Link to={"/api/useform/register"}>register</Link>, which
includes:
</p>
<p>required, minLength, maxLength, validate</p>
<CodeArea
url="https://codesandbox.io/s/react-hook-form-usefieldarray-rules-iyejbp?file=/src/index.js"
withOutCopy
rawData={`useFieldArray({
rules: { minLength: 4 }
})
`}
/>
<p>
In case of validation error, the <code>root</code> property
is appended to{" "}
<code>formState.errors?.fieldArray?.root</code>
of type{" "}
<Link to="ts/#FieldError">
<code>FieldError</code>
</Link>
<p>
<b className={typographyStyles.note}>Important: </b>This
is only applicable to <strong>built-in</strong> validation
only
</p>
<Link to="api/useform/#validationResolver">Resolvers</Link>{" "}
are yet to support <code>useFieldArray</code> root level
validation.
</p>
</td>
</tr>
</tbody>
</table>
</div>
Expand Down
6 changes: 1 addition & 5 deletions src/data/en/getStarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,7 @@ export default {
AntD
</a>{" "}
and{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
. To make this simple, we provide a wrapper component:{" "}
Expand Down
6 changes: 1 addition & 5 deletions src/data/es/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -872,11 +872,7 @@ export default {
AntD
</a>{" "}
y{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
. Este componente los envuelve para que trabajar con ellos sea más
Expand Down
6 changes: 1 addition & 5 deletions src/data/es/getStarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,7 @@ export default {
AntD
</a>{" "}
y{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
, por lo que hemos construído un componente que los envuelve:{" "}
Expand Down
6 changes: 1 addition & 5 deletions src/data/jp/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -895,11 +895,7 @@ validate: (value) => value === getValues('firstName');"
AntD
</a>{" "}
、{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
などの外部の制御された UI{" "}
Expand Down
6 changes: 1 addition & 5 deletions src/data/jp/getStarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,7 @@ export default {
AntD
</a>{" "}
、{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>{" "}
などの外部の制御された UI{" "}
Expand Down
6 changes: 1 addition & 5 deletions src/data/kr/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1137,11 +1137,7 @@ React.useEffect(() => {
AntD
</a>{" "}
혹은{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>{" "}
와 같은 제어 컴포넌트를 사용하는 외부 라이브러리와 조합하여 사용하는
Expand Down
6 changes: 1 addition & 5 deletions src/data/kr/getStarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,7 @@ export default {
AntD
</a>{" "}
그리고{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>{" "}
같이 외부 라이브러리에서 제공하는 제어 컴포넌트와 함께 사용해야 할 때가
Expand Down
6 changes: 1 addition & 5 deletions src/data/pt/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -880,11 +880,7 @@ validate: (value) => value === getValues('firstName');"
AntD
</a>{" "}
e{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
. Este componente irá fazer sua vida mais simples.
Expand Down
6 changes: 1 addition & 5 deletions src/data/pt/getStarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,7 @@ export default {
AntD
</a>{" "}
e{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
, consequentemente precisamos construir um componente por volta:{" "}
Expand Down
8 changes: 2 additions & 6 deletions src/data/ru/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1171,11 +1171,7 @@ validate: (value) => value === getValues('firstName');"
AntD
</a>{" "}
и{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
. Этот компонент-обёртка сделает вашу жизнь проще при работе с ними.
Expand Down Expand Up @@ -1306,7 +1302,7 @@ validate: (value) => value === getValues('firstName');"
</p>

<p>
Мы официально поддерживаем Yup, Joi и Superstruct как
Мы официально поддерживаем Yup, Joi и Superstruct как
<a
href="https://github.com/react-hook-form/react-hook-form-resolvers"
target="blank"
Expand Down
6 changes: 1 addition & 5 deletions src/data/ru/getStarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,7 @@ export default {
AntD
</a>{" "}
and{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
, поэтому мы должны создать компонент-обёртку:{" "}
Expand Down
6 changes: 1 addition & 5 deletions src/data/zh/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -939,11 +939,7 @@ export default {
AntD
</a>{" "}
和{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://mui.com/"
>
<a target="_blank" rel="noopener noreferrer" href="https://mui.com/">
MUI
</a>
。 这个包装组件将使您的工作更轻松。
Expand Down
Loading