zenstack icon indicating copy to clipboard operation
zenstack copied to clipboard

[Feature Request] Reuse primitive types with validation rules

Open nahtnam opened this issue 1 year ago • 0 comments

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

nahtnam avatar May 17 '24 08:05 nahtnam