Validate UUID
irfancnk opened this issue ยท 2 comments
irfancnk commented
Hi, is there a way to validate whether a given string is valid UUID, according to its generator, if not, is it possible to add that as a new feature?
jeanlescure commented
Version 5 was just released. It has better dictionary handling, thus would make it simple to validate that a short UID contains only characters from a given dictionary.
For this validation to work there would be two assumptions made:
- You know the original dictionary the UID was generated with
- The ShortUniqueId instance performing the validation is using the original dictionary, or the
validate()
function can be told which dictionary to validate against
We will explore implementing this functionality in the following weeks and update this issue as we progress.
Thanks for your contribution @irfancnk ๐๐ผ
jeanlescure commented
This feature has been implemented, you can find the documentation at:
Cheers โ๐ผ