diff --git a/README.md b/README.md index 05f6527..9845837 100644 --- a/README.md +++ b/README.md @@ -59,44 +59,44 @@ const Form = () => { ```typescript const Form = () => { - const { auto, form, errors } = useForm({ - username: '', - email: '', - password: '' - }, { - username: value => value.length > 3, - email: { - validator: /@/, - message: 'Must contain an @', - }, - password: [ - { - validator: /[A-Z]/, - message: 'Must contain an uppercase letter' - }, - { - validator: /[\d]/, - message: 'Must contain a digit' - }, - ] - }) + const { auto, form, errors } = useForm({ + username: '', + email: '', + password: '' + }, { + username: value => value.length > 3, + email: { + validator: /@/, + message: 'Must contain an @', + }, + password: [ + { + validator: /[A-Z]/, + message: 'Must contain an uppercase letter' + }, + { + validator: /[\d]/, + message: 'Must contain a digit' + }, + ] + }) - return ( -
- ) + + ) } ``` @@ -107,31 +107,31 @@ Often it happens that you use a specific input or framework, so the default gett ```typescript const Form = () => { - const { auto, form, errors } = useForm({ - awesome: true, - }) + const { auto, form, errors } = useForm({ + awesome: true, + }) - return ( - - ) + + ) } ```