Skip to content

Commit

Permalink
Added meta parameter to FieldProps validate docs (final-form#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
chromiums authored and erikras committed Nov 15, 2018
1 parent 4fac308 commit d0a3898
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const MyForm = () => (
- [`parse?: ((value: any, name: string) => any) | null`](#parse-value-any-name-string--any--null)
- [`render?: (props: FieldRenderProps) => React.Node`](#render-props-fieldrenderprops--reactnode)
- [`subscription?: FieldSubscription`](#subscription-fieldsubscription)
- [`validate?: (value: ?any, allValues: Object) => ?any`](#validate-value-any-allvalues-object--any)
- [`validate?: (value: ?any, allValues: Object, meta: FieldState) => ?any`](#validate-value-any-allvalues-object--any)
- [`validateFields?: string[]`](#validatefields-string)
- [`value?: any`](#value-any)
- [`FieldRenderProps`](#fieldrenderprops)
Expand Down Expand Up @@ -503,9 +503,9 @@ that selects all of the items of
wish to update for. If you don't pass a `subscription` prop, it defaults to
_all_ of [`FieldState`](https://github.com/final-form/final-form#fieldstate).

#### `validate?: (value: ?any, allValues: Object) => ?any`
#### `validate?: (value: ?any, allValues: Object, meta: FieldState) => ?any`

A function that takes the field value, and all the values of the form and
A function that takes the field value, all the values of the form and the `meta` data about the field and
returns an error if the value is invalid, or `undefined` if the value is valid.

#### `validateFields?: string[]`
Expand Down

0 comments on commit d0a3898

Please sign in to comment.