Skip to content

Custom Constraints#283

Merged
sinclairzx81 merged 10 commits intomasterfrom
custom-constraints
Nov 25, 2022
Merged

Custom Constraints#283
sinclairzx81 merged 10 commits intomasterfrom
custom-constraints

Conversation

@sinclairzx81
Copy link
Copy Markdown
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.

1 participant