Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Reuse primitive types with validation rules #1455

Open
nahtnam opened this issue May 17, 2024 · 0 comments
Open

[Feature Request] Reuse primitive types with validation rules #1455

nahtnam opened this issue May 17, 2024 · 0 comments

Comments

@nahtnam
Copy link

nahtnam commented May 17, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant