-
-
Notifications
You must be signed in to change notification settings - Fork 216
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: greaterThan, smallerThan #975
Comments
Thank you for creating this issue. I agree that we should add such actions. I am just unsure about the naming. It would be great if they would match somehow with |
Maybe:
|
Feel free to create a PR with |
What is more common? "smaller than" or "less than"? Maybe we should use |
Sorry it should be less than, not smaller than. See for example https://orm.drizzle.team/docs/operators#lt I am afraid I will not have the time to get in the project and make a PR. |
Don't worry. I am already thankful for your contribution. I am sure someone else will work on it soon. |
I'll work on adding |
Great library! I only realized there is no possibility to add a "greater than" or "smaller than" validation. Of course,
minValue()
can be used, but it is not really accurate. E.g. when I want a number to be positive (> 0) I have to dominValue(0.001)
but now0.0001
would be invalid so I need to use a very small numberminValue(0.0000001)
but still a smaller number that is positive would be invalid.Therefor I would like to add a feature request to add:
greaterThan()
, orgt()
lessThan()
, orlt()
positive()
from Zod very useful, but it is just a more humanly readable versiongreaterThan(0)
The text was updated successfully, but these errors were encountered: