laravel-model-hashid icon indicating copy to clipboard operation
laravel-model-hashid copied to clipboard

Create validation rule for Hash Id

Open EriBloo opened this issue 2 years ago • 1 comments

Hi. I created this validation rule for my own purpose and I would like to contribute it to your package if it complies with your standards. I guess it's not the cleanest way to validate, but it works properly.

There is another commit I would like you to include (I guess even if you don't want this validation rule) that fixes an exception if you try to decode improper HashId. This is a valid hash for my salt: XvKGYlLgyARBM. If I change any character (eg. XaKGYlLgyARBM) keyFromHashId would thrown an Undefined array key exception.

EriBloo avatar Feb 22 '23 10:02 EriBloo

Hi @deligoez, could you please take a look at this?

EriBloo avatar Feb 27 '23 11:02 EriBloo