This makes the url and http_url validations work with url.URL or any newtype that implements the Stringer interface. I'm not familiar with the codebase so it's kind of a PoC PR to see if you think this can be useful.
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.
But they don't pass, if this is a feature we want and it's the right approach I can investigate deeper. I suspect the reflection magic isn't working as I expected.
Fixes Or Enhances
This makes the
url
andhttp_url
validations work withurl.URL
or any newtype that implements theStringer
interface. I'm not familiar with the codebase so it's kind of a PoC PR to see if you think this can be useful.Make sure that you've checked the boxes below before you submit PR:
But they don't pass, if this is a feature we want and it's the right approach I can investigate deeper. I suspect the reflection magic isn't working as I expected.
@go-playground/validator-maintainers