Open raidgar98 opened 3 days ago
msgspec.convert("0", type=AccountName)
However in general the idea is that you can rely on a type checker to perform validation when types can be statically determined. This is a really good read https://jcristharif.com/msgspec/structs.html#type-validation
See also https://jcristharif.com/msgspec/converters.html for info on the convert method
There is an existing discussion here https://github.com/jcrist/msgspec/issues/513
Question
I have example like this:
but this does not throw any error:
how to force validation? I thought about something like this:
or
But i can't find validate method and because of large amount of objects that are created in my project i don't want to encode to validate all the time. If dedicated method was exposed i can deal with this