Created
July 5, 2020 14:49
-
-
Save Allwin12/399fb6ef4fe47dea45e7e3aa2b213fa9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from validator import validate | |
reqs = {"name": "Jon Doe", | |
"age": 33, | |
"mail": "jon_doe@gmail.com"} | |
rule = {"name": "required", | |
"age": "integer|min:18", | |
"mail": "required|mail"} | |
result = validate(request, rules) # True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment