-
Notifications
You must be signed in to change notification settings - Fork 147
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
Can we get path for functions & regex instead of strings? #73
Comments
As for the link you given, I think it's much better change length and range syntax to below: // for length from 5 to 10 (10 is excluded)
#[validate(length(5..10))]
// for length from 5 to 10 (10 is included)
#[validate(length(5..=10))]
// for length equal to 5
#[validate(length(5))] |
Yes the issue wasn't clear :( So right now for regex and functions, we take a path as a string, eg validator/validator_derive/tests/regex.rs Line 19 in 4b9fe39
It would be neater if the user could write As for the length validator, that's interesting, I've created #76 to track it |
I did some investigates on this. Here are what I found.
|
|
Seeing https://blog.rust-lang.org/2019/04/11/Rust-1.34.0.html#custom-attributes-accept-arbitrary-token-streams maybe we can?
The
next
branch is using attr_literals alreadyThe text was updated successfully, but these errors were encountered: