Set object property alias for errors?
Is there a way to set an alias for a property name, which will be shown before the "must be" in errors?
E.g. if I have a property 'dob' that holds a date of birth, I'd like the error to report "Date of birth must be...", rather than "dob must be..."
I can see that I could configure a completely custom error message, but I'd like to be able to keep the standard errors, just change the name of the property.
2 Replies
Yeah I like that idea if you'd be willing to create a GitHub issue for it
GitHub
Error-specific property aliases · Issue #1431 · arktypeio/arktype
From Discord user @_stuartb: Is there a way to set an alias for a property name, which will be shown before the "must be" in errors? E.g. if I have a property 'dob' that holds a d...