Please how do you validate url inputs in your Phoenix projects forms?

If you want to validate a specific format for YouTube, then I think you will have to write a regexp for YouTube and handle different cases.

http://www\.youtube\.com\/(.+)|https://www\.youtube\.com\/(.+) is of course not so optimal. Could be done with http(s)?:\/\/www\.youtube\.com\/(.+).

Maybe also see this topic for inspiration Validating youtube link

1 Like