arktypea
arktype13mo ago
francis

How can we describe a string with a length restriction?

e.g.:
type("5 < string.numeric < 7").describe("valid otp")


gives the following error message:
otp must be valid otp (was 3)

I would expect the description to override the insertion of the current length. Is there a way to do this?

Similarly, is there an easy way to remove the field name from the error, for use in inline form error display?
Was this page helpful?