Skip to content

New Rule: UUIDv5 #75

Description

@CSenshi

Rule Name: UUIDv5

Rule Description:
The field under validation must be a valid Universally Unique IDentifier version 5 (UUIDv5). UUIDv5 is name based uses SHA-1 for hashing

Rule Usage Example:

reqs = {'data' : '601d90d0-8611-502d-b49b-86c0779b6159'}
rule = {'data' : 'uuidv5'}
validate(reqs, rule) # True

reqs = {'data' : 'a3bb189e-8bf9-3888-9912-ace4e6543002'}
rule = {'data' : 'uuidv5'}
validate(reqs, rule) # False, It fails because data is uuidv1

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions