-
-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Vest sync validation + update to v3 (#117)
- Loading branch information
Showing
6 changed files
with
384 additions
and
205 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`vestResolver should return all the error messages from vestResolver when validation fails and validateAllFieldCriteria set to true 1`] = ` | ||
Object { | ||
"errors": Object { | ||
"deepObject": Object { | ||
"data": Object { | ||
"message": "deepObject.data is required", | ||
"type": "", | ||
"types": Object { | ||
"0": "deepObject.data is required", | ||
}, | ||
}, | ||
}, | ||
"password": Object { | ||
"message": "Password must be at least 5 chars", | ||
"type": "", | ||
"types": Object { | ||
"0": "Password must be at least 5 chars", | ||
"1": "Password must contain a digit", | ||
"2": "Password must contain a symbol", | ||
}, | ||
}, | ||
"username": Object { | ||
"message": "Username is required", | ||
"type": "", | ||
"types": Object { | ||
"0": "Username is required", | ||
"1": "Must be longer than 3 chars", | ||
}, | ||
}, | ||
}, | ||
"values": Object {}, | ||
} | ||
`; | ||
|
||
exports[`vestResolver should return all the error messages from vestResolver when validation fails and validateAllFieldCriteria set to true and \`mode: sync\` 1`] = ` | ||
Object { | ||
"errors": Object { | ||
"deepObject": Object { | ||
"data": Object { | ||
"message": "deepObject.data is required", | ||
"type": "", | ||
"types": Object { | ||
"0": "deepObject.data is required", | ||
}, | ||
}, | ||
}, | ||
"password": Object { | ||
"message": "Password must be at least 5 chars", | ||
"type": "", | ||
"types": Object { | ||
"0": "Password must be at least 5 chars", | ||
"1": "Password must contain a digit", | ||
"2": "Password must contain a symbol", | ||
}, | ||
}, | ||
"username": Object { | ||
"message": "Username is required", | ||
"type": "", | ||
"types": Object { | ||
"0": "Username is required", | ||
"1": "Must be longer than 3 chars", | ||
}, | ||
}, | ||
}, | ||
"values": Object {}, | ||
} | ||
`; | ||
|
||
exports[`vestResolver should return single error message from vestResolver when validation fails and validateAllFieldCriteria set to false 1`] = ` | ||
Object { | ||
"errors": Object { | ||
"deepObject": Object { | ||
"data": Object { | ||
"message": "deepObject.data is required", | ||
"type": "", | ||
}, | ||
}, | ||
"password": Object { | ||
"message": "Password must be at least 5 chars", | ||
"type": "", | ||
}, | ||
"username": Object { | ||
"message": "Username is required", | ||
"type": "", | ||
}, | ||
}, | ||
"values": Object {}, | ||
} | ||
`; | ||
|
||
exports[`vestResolver should return single error message from vestResolver when validation fails and validateAllFieldCriteria set to false and \`mode: sync\` 1`] = ` | ||
Object { | ||
"errors": Object { | ||
"deepObject": Object { | ||
"data": Object { | ||
"message": "deepObject.data is required", | ||
"type": "", | ||
}, | ||
}, | ||
"password": Object { | ||
"message": "Password must be at least 5 chars", | ||
"type": "", | ||
}, | ||
"username": Object { | ||
"message": "Username is required", | ||
"type": "", | ||
}, | ||
}, | ||
"values": Object {}, | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.