-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b27161
commit 6892e39
Showing
89 changed files
with
1,536 additions
and
54 deletions.
There are no files selected for viewing
Binary file added
BIN
+34.1 KB
.yarn/cache/@cspotcode-source-map-support-npm-0.8.1-964f2de99d-5718f26708.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+5.88 KB
.yarn/cache/@jest-test-sequencer-npm-29.0.3-7cd04b82a4-c6868e29a3.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+27.5 KB
.yarn/cache/@jridgewell-trace-mapping-npm-0.3.9-91625cd7fb-d89597752f.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+4.37 KB
.yarn/cache/jest-environment-node-npm-29.0.3-11677cd5bd-76cd5759cd.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+4.29 KB
.yarn/cache/jest-resolve-dependencies-npm-29.0.3-28bd5e7297-43980c0c03.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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
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
41 changes: 41 additions & 0 deletions
41
...s/documentation/docs/api/generated/modules/hooks_forms_useValidateFormSchema.md
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,41 @@ | ||
--- | ||
id: "hooks_forms_useValidateFormSchema" | ||
title: "Module: hooks/forms/useValidateFormSchema" | ||
sidebar_label: "hooks/forms/useValidateFormSchema" | ||
sidebar_position: 0 | ||
custom_edit_url: null | ||
--- | ||
|
||
## Functions | ||
|
||
### useValidateFormSchema | ||
|
||
▸ **useValidateFormSchema**<`Values`\>(`formId`): () => `Promise`<`boolean`\> | ||
|
||
Custom hook to return a function that validates a form using an instance of a schema validator. | ||
|
||
#### Type parameters | ||
|
||
| Name | Type | | ||
| :------ | :------ | | ||
| `Values` | extends [`FormzValues`](types_form.md#formzvalues) | | ||
|
||
#### Parameters | ||
|
||
| Name | Type | Description | | ||
| :------ | :------ | :------ | | ||
| `formId` | `string` | The id of the form. | | ||
|
||
#### Returns | ||
|
||
`fn` | ||
|
||
▸ (): `Promise`<`boolean`\> | ||
|
||
##### Returns | ||
|
||
`Promise`<`boolean`\> | ||
|
||
#### Defined in | ||
|
||
packages/react-formz/src/hooks/forms/useValidateFormSchema.ts:9 |
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,6 @@ | ||
module.exports = { | ||
presets: [ | ||
["@babel/preset-env", { targets: { node: "current" } }], | ||
"@babel/preset-typescript", | ||
], | ||
}; |
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,27 @@ | ||
const { defaults } = require("jest-config"); | ||
const path = require("path"); | ||
|
||
const workspaceNodeModules = path.resolve(__dirname, "../../", "node_modules"); | ||
const rootNodeModules = path.resolve(__dirname, "node_modules"); | ||
|
||
/** @type {import('jest').Config} */ | ||
const config = { | ||
testMatch: ["<rootDir>/**/__tests__/**/*.[jt]s?(x)"], | ||
verbose: true, | ||
transform: { | ||
"\\.[jt]sx?$": path.resolve(workspaceNodeModules, "babel-jest"), | ||
}, | ||
moduleDirectories: [ | ||
workspaceNodeModules, | ||
rootNodeModules, | ||
"src", | ||
], | ||
collectCoverageFrom: [ | ||
'<rootDir>/**/*.{js,jsx,ts,tsx}', | ||
'!<rootDir>/**/index.{js,jsx,ts,tsx}', | ||
'!**/node_modules/**', | ||
'!**/vendor/**', | ||
], | ||
}; | ||
|
||
module.exports = config; |
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,43 @@ | ||
{ | ||
"name": "@zerry/react-formz-validators", | ||
"version": "0.0.1-beta", | ||
"scripts": { | ||
"storybook": "start-storybook -p 6006", | ||
"build-storybook": "build-storybook", | ||
"typecheck": "tsc --noEmit", | ||
"build": "yarn typecheck && yarn build:zod", | ||
"build:zod": "LIB=zod vite build && tsc zod/zod.ts --allowSyntheticDefaultImports --target es2016 --moduleResolution node --declaration --emitDeclarationOnly --declarationDir zod/dist/", | ||
"prepublishOnly": "yarn test && yarn build", | ||
"test": "jest", | ||
"test:watch": "jest --watch", | ||
"test:generate-output": "jest --json --outputFile=.jest-test-results.json", | ||
"test:coverage": "jest --coverage=true" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.19.0", | ||
"@babel/preset-env": "^7.19.0", | ||
"@babel/preset-react": "^7.18.6", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@vitejs/plugin-react": "^2.1.0", | ||
"@zerry/react-formz": "workspace:^", | ||
"babel-jest": "^29.0.2", | ||
"babel-loader": "^8.2.5", | ||
"jest": "^29.0.3", | ||
"jest-environment-jsdom": "^29.0.2", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.8.3", | ||
"vite": "^3.1.0", | ||
"yup": "^0.32.11", | ||
"zod": "^3.19.1" | ||
}, | ||
"peerDependencies": { | ||
"@zerry/react-formz": "^0.1.0-beta" | ||
}, | ||
"exports": { | ||
"./zod": { | ||
"umd": "./zod/dist/zod.umd.js", | ||
"import": "./zod/dist/zod.mjs", | ||
"require": "./zod/dist/zod.js" | ||
} | ||
} | ||
} |
Oops, something went wrong.