Skip to content

Commit

Permalink
Fix #934. Update edit urls on nested docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpalmer committed Sep 26, 2018
1 parent c2b27df commit 4ce23a1
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/api/connect.md
@@ -1,6 +1,7 @@
---
id: connect
title: connect()
custom_edit_url: https://github.com/jaredpalmer/formik/edit/master/docs/api/connect.md
---

`connect()` is a higher-order component (HoC) that allows you to hook anything into Formik's context. It is used internally to construct `<Field>` and `<Form>`, but you can use it to build out new components as your needs change.
Expand Down
1 change: 1 addition & 0 deletions docs/api/errormessage.md
@@ -1,6 +1,7 @@
---
id: errormessage
title: <ErrorMessage />
custom_edit_url: https://github.com/jaredpalmer/formik/edit/master/docs/api/errormessage.md
---

`<ErrorMessage />` is a component that renders the error message of a given field if that field has been visited (i.e.`touched[name] === true`) (and there is an `error` message present). It expects that all error messages are stored for a given field as a string. Like `<Field />`, `<FastField />`, and `<FieldArray />`, lodash-like dot path and bracket syntax is supported.
Expand Down
1 change: 1 addition & 0 deletions docs/api/fastfield.md
@@ -1,6 +1,7 @@
---
id: fastfield
title: <FastField />
custom_edit_url: https://github.com/jaredpalmer/formik/edit/master/docs/api/fastfield.md
---

## Before we start
Expand Down
1 change: 1 addition & 0 deletions docs/api/field.md
@@ -1,6 +1,7 @@
---
id: field
title: <Field />
custom_edit_url: https://github.com/jaredpalmer/formik/edit/master/docs/api/field.md
---

`<Field />` will automagically hook up inputs to Formik. It uses the `name`
Expand Down
1 change: 1 addition & 0 deletions docs/api/fieldarray.md
@@ -1,6 +1,7 @@
---
id: fieldarray
title: <FieldArray />
custom_edit_url: https://github.com/jaredpalmer/formik/edit/master/docs/api/fieldarray.md
---

`<FieldArray />` is a component that helps with common array/list manipulations. You pass it a `name` property with the path to the key within `values` that holds the relevant array. `<FieldArray />` will then give you access to array helper methods via render props. For convenience, calling these methods will trigger validation and also manage `touched` for you.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/form.md
@@ -1,6 +1,7 @@
---
id: form
title: <Form />
custom_edit_url: https://github.com/jaredpalmer/formik/edit/master/docs/api/form.md
---

Form is a small wrapper around an HTML `<form>` element that automatically hooks into Formik's `handleSubmit`. All other props are passed directly through to the DOM node.
Expand All @@ -12,4 +13,3 @@ Form is a small wrapper around an HTML `<form>` element that automatically hooks
// is identical to this...
<form onSubmit={formikProps.handleSubmit} {...props} />
```

1 change: 1 addition & 0 deletions docs/api/formik.md
@@ -1,6 +1,7 @@
---
id: formik
title: <Formik />
custom_edit_url: https://github.com/jaredpalmer/formik/edit/master/docs/api/formik.md
---

`<Formik>` is a component that helps you with building forms. It uses a render
Expand Down
1 change: 1 addition & 0 deletions docs/api/withFormik.md
@@ -1,6 +1,7 @@
---
id: withFormik
title: withFormik()
custom_edit_url: https://github.com/jaredpalmer/formik/edit/master/docs/api/withFormik.md
---

Create a higher-order React component class that passes props and form handlers
Expand Down
1 change: 1 addition & 0 deletions docs/guides/arrays.md
@@ -1,6 +1,7 @@
---
id: arrays
title: Arrays and Nested Objects
custom_edit_url: https://github.com/jaredpalmer/formik/edit/master/docs/guides/arrays.md
---

Formik has support for nested objects and arrays out of the box. These 2 subjects are somewhat related because they both leverage the same syntax.
Expand Down
1 change: 1 addition & 0 deletions docs/guides/form-submission.md
@@ -1,6 +1,7 @@
---
id: form-submission
title: Form Submission
custom_edit_url: https://github.com/jaredpalmer/formik/edit/master/docs/guides/form-submission.md
---

## Submission Phases
Expand Down
1 change: 1 addition & 0 deletions docs/guides/react-native.md
@@ -1,6 +1,7 @@
---
id: react-native
title: React Native
custom_edit_url: https://github.com/jaredpalmer/formik/edit/master/docs/guides/react-native.md
---

**Formik is 100% compatible with React Native and React Native Web.** However,
Expand Down
1 change: 1 addition & 0 deletions docs/guides/typescript.md
@@ -1,6 +1,7 @@
---
id: typescript
title: TypeScript
custom_edit_url: https://github.com/jaredpalmer/formik/edit/master/docs/guides/react-native.md
---

[![TypeScript Types](https://img.shields.io/npm/types/formik.svg)](https://npm.im/formik)
Expand Down
5 changes: 3 additions & 2 deletions docs/guides/validation.md
@@ -1,6 +1,7 @@
---
id: validation
title: Validation
custom_edit_url: https://github.com/jaredpalmer/formik/edit/master/docs/guides/validation.md
---

Formik is designed to manage forms with complex validation with ease. Formik supports synchronous and asynchronous
Expand Down Expand Up @@ -78,7 +79,7 @@ npm install yup --save
```jsx
import React from 'react';
import { Formik, Form, Field } from 'formik';
import * as Yup from "yup";
import * as Yup from 'yup';

const SignupSchema = Yup.object().shape({
firstName: Yup.string()
Expand Down Expand Up @@ -140,7 +141,7 @@ Formik supports field-level validation via the `<Field>`/`<FastField>` component
```jsx
import React from 'react';
import { Formik, Form, Field } from 'formik';
import * as Yup from "yup";
import * as Yup from 'yup';

function validateEmail(value) {
let error;
Expand Down

0 comments on commit 4ce23a1

Please sign in to comment.