Claus
Claus
Aarktype
Created by GreggOD on 5/19/2025 in #questions
"string.email>0" custom message not working
configure only works with scopes:
configure({
required: {
message: (ctx) => `The field ${ctx.path} is required`,
},
});

const $ = type.scope({});

const schema = $.type({
name: "string",
});
configure({
required: {
message: (ctx) => `The field ${ctx.path} is required`,
},
});

const $ = type.scope({});

const schema = $.type({
name: "string",
});
2 replies
Aarktype
Created by themoonrat on 5/6/2025 in #questions
Performance comparison to Zod for piped string
Not sure about any tips, but a small change I would do is checking the prefix before email. It looks like it would perform better.
2 replies