Closed CSenshi closed 4 years ago
Rule Name: Hex
Rule Description: The field under validation must be a hexadecimal number
Rule Usage Example:
reqs = {"data" : "A1B2c3"} rule = {"data" : "hex"} validate(reqs, rule) # True reqs = {"data" : "0xA1b2C3"} rule = {"data" : "hex"} validate(reqs, rule) # True reqs = {"data" : "abcdefgh"} rule = {"data" : "hex"} validate(reqs, rule) # False, It fails because 'g','h' are not in hexadecimal
Before contributing please review RULES.md (check for duplication), also check CONTRIBUTING.md for more details :100:
Rule Name: Hex
Rule Description: The field under validation must be a hexadecimal number
Rule Usage Example:
Before contributing please review RULES.md (check for duplication), also check CONTRIBUTING.md for more details :100: