Skip to content

Commit

Permalink
test(computed-types): update test (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisre authored May 13, 2021
1 parent 85e5e7d commit d88bc94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ import { computedTypesResolver } from '@hookform/resolvers/zod';
import Schema, { number, string } from 'computed-types';

const schema = Schema({
username: string.trim().error('username field is required'),
password: string.trim().error('password field is required'),
username: string.min(1).error('username field is required'),
password: string.min(1).error('password field is required'),
password: number,
});

Expand Down
4 changes: 2 additions & 2 deletions computed-types/src/__tests__/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import Schema, { Type, string } from 'computed-types';
import { computedTypesResolver } from '..';

const schema = Schema({
username: string.trim().error('username field is required'),
password: string.trim().error('password field is required'),
username: string.min(2).error('username field is required'),
password: string.min(2).error('password field is required'),
});

type FormData = Type<typeof schema> & { unusedProperty: string };
Expand Down

0 comments on commit d88bc94

Please sign in to comment.