From 6bf59d567156a8624a3bfaea42001264f938084f Mon Sep 17 00:00:00 2001 From: bluebill1049 Date: Tue, 16 Jun 2020 16:58:45 +1000 Subject: [PATCH 01/11] try to fix code format --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3dd0682..06fa045 100644 --- a/README.md +++ b/README.md @@ -110,13 +110,13 @@ export default function App() { ## API -| Prop | Type | Required | Description | -| :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | string | ✓ | associated field name. | -| `errors` | object | | errors object from React Hook Form. It's optional if you are using `FormProvider`. | -| `message` | string \| React.ReactElement | | inline error message. | -| `as` | string \|
React.ReactElement \|
React.ComponentType | | Wrapper component or HTML tag. eg: `as="p"`, `as={

}` or `as={CustomComponent}` | -| `render` | (payload: {
  message: string \| React.ReactElement;
  messages?: Record<
    string,
    (string \| React.ReactElement \| boolean \| undefined)[]
  >;
}) => React.ReactNode | | This is a [render prop](https://reactjs.org/docs/render-props.html) for rendering error message or messages.
Note: you need to set `criteriaMode` to `all` for using messages. | +| Prop | Type | Required | Description | +| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | `string` | ✓ | associated field name. | +| `errors` | `object` | | errors object from React Hook Form. It's optional if you are using `FormProvider`. | +| `message` | `string \| React.ReactElement` | | inline error message. | +| `as` | `string \|
React.ReactElement \|
React.ComponentType` | | Wrapper component or HTML tag. eg: `as="p"`, `as={

}` or `as={CustomComponent}` | +| `render` | `(payload: {
  message: string \| React.ReactElement;
  messages?: Record<
    string,
    (string \| React.ReactElement \| boolean \| undefined)[]
  >;
}) => React.ReactNode` | | This is a [render prop](https://reactjs.org/docs/render-props.html) for rendering error message or messages.
Note: you need to set `criteriaMode` to `all` for using messages. | ## Backers From 2bc814c6d03561755a619fb5f1b1621ee90d4a7f Mon Sep 17 00:00:00 2001 From: bluebill1049 Date: Tue, 16 Jun 2020 16:59:20 +1000 Subject: [PATCH 02/11] update readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 06fa045..2aecbdd 100644 --- a/README.md +++ b/README.md @@ -112,8 +112,8 @@ export default function App() { | Prop | Type | Required | Description | | :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | `string` | ✓ | associated field name. | -| `errors` | `object` | | errors object from React Hook Form. It's optional if you are using `FormProvider`. | +| `name` | `string` | ✓ | Associated field name. | +| `errors` | `object` | | `errors` object from React Hook Form. It's optional if you are using `FormProvider`. | | `message` | `string \| React.ReactElement` | | inline error message. | | `as` | `string \|
React.ReactElement \|
React.ComponentType` | | Wrapper component or HTML tag. eg: `as="p"`, `as={

}` or `as={CustomComponent}` | | `render` | `(payload: {
  message: string \| React.ReactElement;
  messages?: Record<
    string,
    (string \| React.ReactElement \| boolean \| undefined)[]
  >;
}) => React.ReactNode` | | This is a [render prop](https://reactjs.org/docs/render-props.html) for rendering error message or messages.
Note: you need to set `criteriaMode` to `all` for using messages. | From a813a4aae9130f758330e7fbc51ca8e2ca08490d Mon Sep 17 00:00:00 2001 From: bluebill1049 Date: Tue, 16 Jun 2020 17:01:11 +1000 Subject: [PATCH 03/11] update readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 2aecbdd..bf9f618 100644 --- a/README.md +++ b/README.md @@ -110,13 +110,13 @@ export default function App() { ## API -| Prop | Type | Required | Description | -| :-------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | `string` | ✓ | Associated field name. | -| `errors` | `object` | | `errors` object from React Hook Form. It's optional if you are using `FormProvider`. | -| `message` | `string \| React.ReactElement` | | inline error message. | -| `as` | `string \|
React.ReactElement \|
React.ComponentType` | | Wrapper component or HTML tag. eg: `as="p"`, `as={

}` or `as={CustomComponent}` | -| `render` | `(payload: {
  message: string \| React.ReactElement;
  messages?: Record<
    string,
    (string \| React.ReactElement \| boolean \| undefined)[]
  >;
}) => React.ReactNode` | | This is a [render prop](https://reactjs.org/docs/render-props.html) for rendering error message or messages.
Note: you need to set `criteriaMode` to `all` for using messages. | +| Prop | Type | Required | Description | +| :-------- | :-------------------------------------------------- | :------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | `string` | ✓ | Associated field name. | +| `errors` | `object` | | `errors` object from React Hook Form. It's optional if you are using `FormProvider`. | +| `message` | `string | React.ReactElement` | | inline error message. | +| `as` | `string | React.ReactElement | React.ComponentType` | | Wrapper component or HTML tag. eg: `as="p"`, `as={

}` or `as={CustomComponent}` | +| `render` | `Function` | | This is a [render prop](https://reactjs.org/docs/render-props.html) for rendering error message or messages.
Note: you need to set `criteriaMode` to `all` for using messages. | ## Backers From d910681c3cd98de1637c566968cd5314a015ab23 Mon Sep 17 00:00:00 2001 From: bluebill1049 Date: Tue, 16 Jun 2020 17:01:45 +1000 Subject: [PATCH 04/11] update readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index bf9f618..ba610e0 100644 --- a/README.md +++ b/README.md @@ -110,13 +110,13 @@ export default function App() { ## API -| Prop | Type | Required | Description | -| :-------- | :-------------------------------------------------- | :------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | `string` | ✓ | Associated field name. | -| `errors` | `object` | | `errors` object from React Hook Form. It's optional if you are using `FormProvider`. | -| `message` | `string | React.ReactElement` | | inline error message. | -| `as` | `string | React.ReactElement | React.ComponentType` | | Wrapper component or HTML tag. eg: `as="p"`, `as={

}` or `as={CustomComponent}` | -| `render` | `Function` | | This is a [render prop](https://reactjs.org/docs/render-props.html) for rendering error message or messages.
Note: you need to set `criteriaMode` to `all` for using messages. | +| Prop | Type | Required | Description | +| :-------- | :--------------------------------------------------- | :------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | `string` | ✓ | Associated field name. | +| `errors` | `object` | | `errors` object from React Hook Form. It's optional if you are using `FormProvider`. | +| `message` | `string \| React.ReactElement` | | inline error message. | +| `as` | `string \| React.ReactElement | React.ComponentType` | | Wrapper component or HTML tag. eg: `as="p"`, `as={

}` or `as={CustomComponent}` | +| `render` | `Function` | | This is a [render prop](https://reactjs.org/docs/render-props.html) for rendering error message or messages.
Note: you need to set `criteriaMode` to `all` for using messages. | ## Backers From 8c256171c1693f9bb593f8ea803fcd58a005f869 Mon Sep 17 00:00:00 2001 From: bluebill1049 Date: Tue, 16 Jun 2020 17:02:26 +1000 Subject: [PATCH 05/11] update readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ba610e0..d32920e 100644 --- a/README.md +++ b/README.md @@ -110,13 +110,13 @@ export default function App() { ## API -| Prop | Type | Required | Description | -| :-------- | :--------------------------------------------------- | :------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | `string` | ✓ | Associated field name. | -| `errors` | `object` | | `errors` object from React Hook Form. It's optional if you are using `FormProvider`. | -| `message` | `string \| React.ReactElement` | | inline error message. | -| `as` | `string \| React.ReactElement | React.ComponentType` | | Wrapper component or HTML tag. eg: `as="p"`, `as={

}` or `as={CustomComponent}` | -| `render` | `Function` | | This is a [render prop](https://reactjs.org/docs/render-props.html) for rendering error message or messages.
Note: you need to set `criteriaMode` to `all` for using messages. | +| Prop | Type | Required | Description | +| :-------- | :---------------------------------------------------- | :------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | `string` | ✓ | Associated field name. | +| `errors` | `object` | | `errors` object from React Hook Form. It's optional if you are using `FormProvider`. | +| `message` | `string \| React.ReactElement` | | inline error message. | +| `as` | `string \| React.ReactElement \| React.ComponentType` | | Wrapper component or HTML tag. eg: `as="p"`, `as={

}` or `as={CustomComponent}` | +| `render` | `Function` | | This is a [render prop](https://reactjs.org/docs/render-props.html) for rendering error message or messages.
Note: you need to set `criteriaMode` to `all` for using messages. | ## Backers From 228c5d6112e0bc4f047679917eca809348c73914 Mon Sep 17 00:00:00 2001 From: bluebill1049 Date: Tue, 16 Jun 2020 17:04:35 +1000 Subject: [PATCH 06/11] reduce font --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d32920e..06303b2 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ $ npm install @hookform/error-message ## Quickstart -### Single Error Message +#### Single Error Message ```jsx import React from 'react'; @@ -62,7 +62,7 @@ export default function App() { } ``` -### Multiple Error Messages +#### Multiple Error Messages ```jsx import React from 'react'; From 6117603f15475f64fafd171493783b5d531cfae4 Mon Sep 17 00:00:00 2001 From: bluebill1049 Date: Tue, 16 Jun 2020 17:05:07 +1000 Subject: [PATCH 07/11] reduce font --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 06303b2..c39498e 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ $ npm install @hookform/error-message ## Quickstart -#### Single Error Message +Single Error Message ```jsx import React from 'react'; @@ -62,7 +62,7 @@ export default function App() { } ``` -#### Multiple Error Messages +Multiple Error Messages ```jsx import React from 'react'; From 8b59a7fc386da98a66e60a62c7ab3d4765a80fb7 Mon Sep 17 00:00:00 2001 From: bluebill1049 Date: Tue, 16 Jun 2020 17:06:49 +1000 Subject: [PATCH 08/11] give a break line --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c39498e..f16dbcc 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,8 @@ export default function App() { } ``` +--- + Multiple Error Messages ```jsx From 79bfc7e59ea447e7679bb677174198c0d282d305 Mon Sep 17 00:00:00 2001 From: bluebill1049 Date: Tue, 16 Jun 2020 17:07:39 +1000 Subject: [PATCH 09/11] give a dot point --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f16dbcc..0f4e297 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ $ npm install @hookform/error-message ## Quickstart -Single Error Message +- Single Error Message ```jsx import React from 'react'; @@ -64,7 +64,7 @@ export default function App() { --- -Multiple Error Messages +- Multiple Error Messages ```jsx import React from 'react'; From fb13d841bcdb9c6d761ae3b033af6c0d4d21a2f5 Mon Sep 17 00:00:00 2001 From: bluebill1049 Date: Tue, 16 Jun 2020 17:08:49 +1000 Subject: [PATCH 10/11] update readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0f4e297..102a07c 100644 --- a/README.md +++ b/README.md @@ -112,13 +112,13 @@ export default function App() { ## API -| Prop | Type | Required | Description | -| :-------- | :---------------------------------------------------- | :------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | `string` | ✓ | Associated field name. | -| `errors` | `object` | | `errors` object from React Hook Form. It's optional if you are using `FormProvider`. | -| `message` | `string \| React.ReactElement` | | inline error message. | -| `as` | `string \| React.ReactElement \| React.ComponentType` | | Wrapper component or HTML tag. eg: `as="p"`, `as={

}` or `as={CustomComponent}` | -| `render` | `Function` | | This is a [render prop](https://reactjs.org/docs/render-props.html) for rendering error message or messages.
Note: you need to set `criteriaMode` to `all` for using messages. | +| Prop | Type | Required | Description | +| :-------- | :---------------------------------------------------- | :------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | `string` | ✓ | Associated field name. | +| `errors` | `object` | | `errors` object from React Hook Form. It's optional if you are using `FormProvider`. | +| `message` | `string \| React.ReactElement` | | inline error message. | +| `as` | `string \| React.ReactElement \| React.ComponentType` | | Wrapper component or HTML tag. eg: `as="p"`, `as={

}` or `as={CustomComponent}` | +| `render` | `Function` | | This is a [render prop](https://reactjs.org/docs/render-props.html) for rendering error message or messages.
Note: you need to set `criteriaMode` to `all` for using messages. | ## Backers From 257ae68e3130cbc885a1e1a9f5b42ad30e9db075 Mon Sep 17 00:00:00 2001 From: bluebill1049 Date: Tue, 16 Jun 2020 17:09:25 +1000 Subject: [PATCH 11/11] update readme --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 102a07c..ed0a65a 100644 --- a/README.md +++ b/README.md @@ -112,13 +112,13 @@ export default function App() { ## API -| Prop | Type | Required | Description | -| :-------- | :---------------------------------------------------- | :------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `name` | `string` | ✓ | Associated field name. | -| `errors` | `object` | | `errors` object from React Hook Form. It's optional if you are using `FormProvider`. | -| `message` | `string \| React.ReactElement` | | inline error message. | -| `as` | `string \| React.ReactElement \| React.ComponentType` | | Wrapper component or HTML tag. eg: `as="p"`, `as={

}` or `as={CustomComponent}` | -| `render` | `Function` | | This is a [render prop](https://reactjs.org/docs/render-props.html) for rendering error message or messages.
Note: you need to set `criteriaMode` to `all` for using messages. | +| Prop | Type | Required | Description | +| :-------- | :---------------------------------------------------- | :------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `name` | `string` | ✓ | Associated field name. | +| `errors` | `object` | | `errors` object from React Hook Form. It's optional if you are using `FormProvider`. | +| `message` | `string \| React.ReactElement` | | inline error message. | +| `as` | `string \| React.ReactElement \| React.ComponentType` | | Wrapper component or HTML tag. eg: `as="p"`, `as={

}` or `as={CustomComponent}` | +| `render` | `Function` | | This is a [render prop](https://reactjs.org/docs/render-props.html) for rendering error message or messages.
Note: you need to set `criteriaMode` to `all` for using messages. | ## Backers