A
arktype4mo ago
jole

email or empty string not working

export const feedbackSchema = type({
contact: 'string.email | string == 0'
});
export const feedbackSchema = type({
contact: 'string.email | string == 0'
});
Is giving runtime error: ParseError: Key $ is not valid on maxLength schema but it works with just string.email
3 Replies
ssalbdivad
ssalbdivad3mo ago
Definitely something going very wrong here, will take a look thanks! https://github.com/arktypeio/arktype/issues/1221
GitHub
Error in union with length constraint · Issue #1221 · arktypeio/ark...
export const feedbackSchema = type({ // ParseError: Key $ is not valid on maxLength schema contact: "string.email | string == 0", });
ssalbdivad
ssalbdivad3mo ago
This will be fixed in next release!
jole
joleOP3mo ago
Thanks

Did you find this page helpful?