-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
currently we have the Schematic derived macro to mark it can be described as a Parameter, but we wanna introduce a integrated way to validate the value coming from user input.
like the email must be match the email regex, like #[validation(regex="[a-zA-Z]+@[a-z]{2}.com")] , like the number must be in the range of 0-100 :#[validation(min=0, max=100)]
so it means that we need to inject into the trait FromRequest. add a new trait called Validator and then impl Validator for MyStruct then impl FromRequest for T where T: Validator
Metadata
Metadata
Assignees
Labels
No labels