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: UUIDv1 #72

Closed CSenshi closed 4 years ago

CSenshi commented 4 years ago

Rule Description The field under validation must be a valid Universally Unique IDentifier version 1 (UUIDv1). UUIDv1 is time based.

Rule Usage Example

reqs = {'data' : 'eb241bb4-c087-11ea-b3de-0242ac130004'}
rule = {'data' : 'uuidv1'}
validate(reqs, rule) # True

reqs = {'data' : 'bba617b4-364b-4a0d-9e96-cb8a24ef1bec'}
rule = {'data' : 'uuidv1'}
validate(reqs, rule) # False, it's uuidv4

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

LashaBuxo commented 4 years ago

I'd like to do this task