diff --git a/README.md b/README.md
index bbf26b39..d7a615da 100644
--- a/README.md
+++ b/README.md
@@ -71,6 +71,7 @@ But you can still check the type definition [here](https://github.com/react-comp
| fields | Control Form fields status. Only use when in Redux | [FieldData](#fielddata)[] | - |
| form | Set form instance created by `useForm` | [FormInstance](#useform) | `Form.useForm()` |
| initialValues | Initial value of Form | Object | - |
+| name | Config name with [FormProvider](#formprovider) | string | - |
| validateMessages | Set validate message template | [ValidateMessages](#validatemessages) | - |
| onFieldsChange | Trigger when any value of Field changed | (changedFields, allFields): void | - |
| onValuesChange | Trigger when any value of Field changed | (changedValues, values): void | - |
@@ -133,6 +134,13 @@ class Demo extends React.Component {
| setFieldsValue | Set fields value | (values) => void |
| validateFields | Trigger fields to validate | (nameList?: [NamePath](#namepath)[], options?: ValidateOptions) => Promise |
+## FormProvider
+
+| Prop | Description | Type | Default |
+| ---------------- | ----------------------------------------- | ---------------------------------------- | ------- |
+| validateMessages | Config global `validateMessages` template | [ValidateMessages](#validatemessages) | - |
+| onFormChange | Trigger by named form fields change | (name, { changedFields, forms }) => void | - |
+
## Interface
### NamePath
@@ -177,8 +185,15 @@ class Demo extends React.Component {
### ValidateMessages
-Please ref
-
-| Prop | Type |
-| -------- | ---- |
-| required | |
+Validate Messages provides a list of error template.
+You can ref [here](https://github.com/react-component/field-form/blob/master/src/utils/messages.ts) for fully default templates.
+
+| Prop | Description |
+| ------- | ------------------- |
+| enum | Rule `enum` prop |
+| len | Rule `len` prop |
+| max | Rule `max` prop |
+| min | Rule `min` prop |
+| name | Field name |
+| pattern | Rule `pattern` prop |
+| type | Rule `type` prop |
diff --git a/examples/StateForm-context.tsx b/examples/StateForm-context.tsx
new file mode 100644
index 00000000..389a20cc
--- /dev/null
+++ b/examples/StateForm-context.tsx
@@ -0,0 +1,79 @@
+/* eslint-disable react/prop-types */
+
+import React from 'react';
+import StateForm, { FormProvider } from '../src';
+import Input from './components/Input';
+import LabelField from './components/LabelField';
+import { ValidateMessages } from '../src/interface';
+
+const myMessages: ValidateMessages = {
+ required: '${name} 是必需品',
+};
+
+const formStyle: React.CSSProperties = {
+ padding: '10px 15px',
+ flex: 'auto',
+};
+
+const Form1 = () => {
+ const [form] = StateForm.useForm();
+
+ return (
+ Change me! Will follow Form 1 but not sync backForm 1
+ Form 2
+
Support global `validateMessages` config and communication between forms.
+