Closed grosch closed 6 years ago
It looks like you're just looking for a 36 character alpha-numeric string, which will let invalid things in. Would be better to really check the UUID format, like at https://gist.github.com/joel-james/3a6201861f12a7acf4f2
I checked the gist, it works on v4 UUID but fails on v1
Above commit works for both
Yes but if I pass in a string of just 36 zeros it will also pass.
@grosch Please check the commit! see the tests as well!
Awesome, that looks much better. Thank you! When's the the official release gonna be? You've been RC6 for years now :P
It's pretty common to use a UUID type as the 'key' for url components. What do you think about providing a {@type uuid} modifier, or even easier just having '@param uuid $uid' for the type.
Right now all my uid params have to put {@min 36} {@max 36} on them. I'm thinking that could be built in, as well as maybe even doing a regex match to make sure it's in the right format.