Closed Dreamsorcerer closed 4 years ago
In this case it is better to create PR with validations that you want to add, because I, personally, do not really understand what do you want to add and its use cases.
Well, use case is validating that a string matches the format from one of those functions. In particular, the urlsafe one could be used to check that a string is safe to be output into a URL.
I'll definetely have a go at creating these myself though, and I'll send a PR then.
Would be nice to have a couple more String validators that validated the string as e.g. hex or url safe. Matching for example, the output you'd get from
secrets.token_hex()
andsecrets.token_urlsafe()
.