Rick
Rick
Aarktype
Created by Rick on 5/3/2025 in #questions
Passing a name for a primitive value?
Currently I am using this little helper to do it:
export function namedType(schema: Type, name: string) {
return schema.configure({
message: (ctx) => `${name} ${ctx.problem}`,
});
}
export function namedType(schema: Type, name: string) {
return schema.configure({
message: (ctx) => `${name} ${ctx.problem}`,
});
}
But I wondered if there is a native api to do this that I missed?
2 replies