Skip to content

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

Closed

Description

@nahtnam

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

Activity

  1. ymc9 commented on Oct 27, 2026

    @ymc9
    Member

    Released in v3.10.0 via #2852.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions