Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Constraints #283

Merged
merged 10 commits into from Nov 25, 2022
Merged

Custom Constraints #283

merged 10 commits into from Nov 25, 2022

Conversation

sinclairzx81
Copy link
Owner

This PR updates the user defined types to pass a schema on validation. The schema may encode constraints for the custom type that can be used in the validation process.

import { Custom } from '@sinclair/typebox/custom'

Custom.Set('Foo', (schema, value) => { ... })

@sinclairzx81 sinclairzx81 merged commit 1801754 into master Nov 25, 2022
@sinclairzx81 sinclairzx81 deleted the custom-constraints branch November 25, 2022 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant