CSenshi / Validator

Easy-to-use, Highly Configurable Python Data Validator. Inspired by Laravel Validator
https://pypi.org/project/validator/
MIT License
46 stars 23 forks source link

New Rule: Accepted #88

Closed CSenshi closed 4 years ago

CSenshi commented 4 years ago

Rule Name: Accepted

Rule Description: The field under validation must be 'yes', 'on', '1', or 'True'(true). This is useful for validating "Terms of Service" acceptance.

Rule Usage Example:

reqs = {"data" : "True"}
rule = {"data" : "accepted"}
validate(reqs, rule) # True

reqs = {"data" : "False"}
rule = {"data" : "accepted"}
validate(reqs, rule) # False

Before contributing please review RULES.md (check for duplication), also check CONTRIBUTING.md for more details :100:

Rogavactive commented 4 years ago

I would like to work on this!