Skip to content

Instantly share code, notes, and snippets.

@Allwin12
Created July 5, 2020 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Allwin12/399fb6ef4fe47dea45e7e3aa2b213fa9 to your computer and use it in GitHub Desktop.
Save Allwin12/399fb6ef4fe47dea45e7e3aa2b213fa9 to your computer and use it in GitHub Desktop.
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