zenstack
zenstack copied to clipboard
[Feature Request] Reuse primitive types with validation rules
Is your feature request related to a problem? Please describe.
I find that for every string field I am doing model String @trim @length(min: 1), any thoughts on a way that it can be improved?
Describe the solution you'd like A way to define custom types with validation rules, for example: NonEmptyString
Or just being able to define custom validation, such as @nonEmptyString = @trim @length(min: 1)
Describe alternatives you've considered Right now I just manually copy and paste
Additional context
https://discord.com/channels/1035538056146595961/1087761218049167380/1240500509048176762