Exactly what do you want to validate? But I would definitely use the
FILTER_SANITIZE_URL
Method. Also found https://laracasts.com/discuss/channels/general-discussion/url-validation
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a form where people can put URLs it can be just one but it also can be a large string of coma separated URLs. How can i validate each of this URLs after separated.
What is the best or most common apporach for this.
Please or to participate in this conversation.