Skip to content

Commit

Permalink
Merge branch 'master' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisre committed Mar 31, 2021
2 parents 92d5b6a + 5672e65 commit 13a83e7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ module.exports = {
overrides: [
{
files: ['config/*.js'],
rules: { '@typescript-eslint/no-var-requires': 'off' },
rules: {
'@typescript-eslint/no-var-requires': 'off',
'no-console': 'off',
},
},
],
};
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ const App = () => {
</form>
);
};

export default App;
```

### [Zod](https://github.com/vriad/zod)
Expand Down Expand Up @@ -116,11 +118,11 @@ A simple and composable way to validate data in JavaScript (or TypeScript).
import React from 'react';
import { useForm } from 'react-hook-form';
import { superstructResolver } from '@hookform/resolvers/superstruct';
import { struct } from 'superstruct';
import { object, string, number } from 'superstruct';

const schema = struct({
name: 'string',
age: 'number',
const schema = object({
name: string(),
age: number(),
});

const App = () => {
Expand All @@ -131,11 +133,13 @@ const App = () => {
return (
<form onSubmit={handleSubmit((d) => console.log(d))}>
<input name="name" ref={register} />
<input name="age" type="number" ref={register} />
<input name="age" type="number" ref={register({ valueAsNumber: true })} />
<input type="submit" />
</form>
);
};

export default App;
```

### [Joi](https://github.com/sideway/joi)
Expand Down Expand Up @@ -167,6 +171,8 @@ const App = () => {
</form>
);
};

export default App;
```

### [Vest](https://github.com/ealush/vest)
Expand Down Expand Up @@ -220,6 +226,8 @@ const App = () => {
</form>
);
};

export default App;
```

## Backers
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,5 @@
"*.{md,json,yml}": [
"prettier --write"
]
},
"dependencies": {}
}
}
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10180,9 +10180,9 @@ xtend@~4.0.1:
integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==

y18n@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
integrity sha1-bRX7qITAhnnA136I53WegR4H+kE=
version "3.2.2"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696"
integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==

y18n@^4.0.0:
version "4.0.1"
Expand Down

0 comments on commit 13a83e7

Please sign in to comment.