Skip to content

Commit

Permalink
remove console log
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin Schultz committed Aug 20, 2021
1 parent b10fa55 commit 8fbdce0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,14 @@ Then you can simply integrate with the default Formik flow.
```typescript jsx
export const Login: FunctionComponent = () => {

const [validate,] = useValidation(LoginValidation);
const [validate, errors] = useValidation(LoginValidation);

return (
<Formik initialValues={{username: '', password: ''}}
validateOnBlur
validateOnChange
validate={validate}>
{({values, errors, touched, handleChange, handleBlur}) => (
{({values, touched, handleChange, handleBlur}) => (
<Form>

<label htmlFor="username">Username</label>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-class-validator",
"version": "1.2.1",
"version": "1.2.2",
"description": "React hook for validation with class-validator",
"main": "dist/index.js",
"scripts": {
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ export const useValidation = <T, K extends keyof T>(validationClass: Newable<T>)
[key]: validationErrors[key]
}), {});

console.dir(filteredErrors);

setErrors({
...filteredErrors,
...validation
Expand Down

0 comments on commit 8fbdce0

Please sign in to comment.