Open timvisee opened 1 year ago
Hold on, there is https://github.com/Keats/validator/pull/262 close to being merged so it would be better to check on that branch
Hold on, there is #262 close to being merged so it would be better to check on that branch
Thanks for the heads up! I'll try to rebase or recreate once it's merged.
Look at the ValidateRange
trait of the next
branch of #262. That's where you can implement all the traits, I forgot what they're called.
Look at the
ValidateRange
trait of thenext
branch of #262. That's where you can implement all the traits, I forgot what they're called.
Fantastic. Much better interface to implement. I'll stall efforts on this until it is merged to prevent constant conflicts.
Can you update the PR if you have time? I'm planning to release the changes soonish
It's merged and released as 0.17 now
I know this PR needs to be updated anyway, but just for the record, it looks like this is missing NonZeroUsize
.
Fixes https://github.com/Keats/validator/issues/269.
Implements support for using the
range
validator on NonZero types from the standard library such asNonZeroU64
.This is just a start and is definitely not ready to be merged. I'm sure some important edge cases are missed. I'm not familiar with this codebase.
I'd like to know if implementing something like this is in-scope before putting more effort into it.