Fixes Or Enhances https://github.com/go-playground/validator/issues/518. Make sure that you've checked the boxes below before you submit PR: [x] Tests exist or have been written that cover this particular change. Change Details: The datauri validation was not allowing certain valid strings; this commit updates the regex to meet RFC 2397. I drew heavily on this gist https://gist.github.com/khanzadimahdi/bab8a3416bdb764b9eda5b38b35735b8, but had to make a few updates to remove some negative lookaheads (which Go doesn't allow afaik), and to account for the way the `isDataURI` function works - it validates the base64 separately from the other parts of the uri. @go-playground/adminspull/548/head
parent
dbbe6958b3
commit
bb5fd36827
Loading…
Reference in new issue