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

Important feature requests #15

Closed
3 tasks
SharkFourSix opened this issue Oct 1, 2024 · 2 comments
Closed
3 tasks

Important feature requests #15

SharkFourSix opened this issue Oct 1, 2024 · 2 comments

Comments

@SharkFourSix
Copy link

Project is heading in the right direction but I feel like it is incomplete without the following:

  • Multiple rules (Very Important)
  • Field caching
  • Allow struct pointers

Multiple rules

type Foo {
    Name string `validate:"not_empty|min=3|max=18|customRule"`
}

Currently, it's impossible to validate fields against multiple rules.

Field Caching

Reflection calls are expensive. It will be better to cache struct fields and tags to improve performance.

Allow struct pointers

Allow passing pointers, then resolve the pointer to get the target struct.

You may want to consider these for v3 milestone

@guiferpa
Copy link
Owner

guiferpa commented Jan 16, 2025

Hey @SharkFourSix , sorry for delay. I completely agree with you. WDYT about create a milestone in some markdown document or some issues to have a better description for each suggestions? BTW I think that's okay put them in v2 in case these changes don't broken any source code that use v2. I think that's possible.

@guiferpa
Copy link
Owner

Multiple rules already supported. Follow this example

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

2 participants