Replies: 1 comment
-
Hey, no worries! For 1, I'd do something like this: const form = type({
password: "string",
confirmPassword: "string"
}).narrow((data, ctx) => {
if (data.password === data.confirmPassword) {
return true
}
return ctx.reject({
description: "identical to password",
path: ["confirmPassword"]
})
}) 2 is a bit more complex. There are customizations available for error messages but they do need more documentation and particularly around internationalization I'm trying to figure out the approach that will integrate best with popular i18n libraries. May be worth checking out the Discord and some of the conversations there around this: Would love to get your feedback! For now you can certainly map over |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry for dummy questions
Beta Was this translation helpful? Give feedback.
All reactions