Hello, in this video, I am going to show you how to validate a you are out. So URL is, you know, like a no, the website address. And there is a filter called filter on school validate URL. So the best, it doesn't allow you to fulfill let me just show you it says invalid email format. ignore that. And I'm updated.
Yeah. So if I put in, like hotmail.com that, you know, that's a valid email, I mean, a URL that doesn't work, I copy this. This will work. But if I removed that, that won't work. Whereas, technically, it should still work with that though. No, browsers nowadays don't require that.
So we're gonna have a more advanced version using preg match. It's gonna be a bit more complex, but don't worry, I'll provide a link that base explains bit more about preg match but this will be a bearer version. First of all, I just want to rename all this to URLs, error, the URL, give me my main URL. URL URL. You are l sound like you are out URL invalid URL format and finding me to update to here to URL URL sick and tired of same URL now, so if I run that, or do that, in panic, I'm still using email boss. Actually, we're not going to be using this anyway.
We'll be replacing all of that. So yeah, fine. Okay, so what we want to do now is yes. So if This doesn't validate if this pragma isn't successful. Then we'll display Sarah. And in here we're going to do is quotation marks for slash backslash, they have got literally this written down or copy do correctly.
Locally, this is something that you generally want to figure out yourself and you can get preg match, you know sort of calculators that'll basically allow you to generate, you know, stuff, this sort of format. This is basically you know, regex regular expressions, if you're familiar with that term from a different coding language. dot and dash a dash that zero dash nine plus ampersand Oh, there we go. There's the act. Wondering why that one's hash, backslash or slash. Question mark equals two.
With the two there we go the tilde underscore, vertical pipe, exclamation mark, colon, comma dot, colon. And now we are going to put we are almost at the end, zero dash nine plus and cash back slash four slash cent equals tilde underscore vertical question. IPE square bracket forward slash I just specify the URL for the top copy Derek correctly know that are you are them to do that invalid format if I copy this template and let people do this so invalid URL format actually no I put it so it does require that one second. Go to Greg match. calculator if I could create something live and live regex trademarks URL HTTP is always the learning of For me as well. Let's see what this is.
Is this the let's try this now. You stop here from we have a winner. And I do that. And if I do that with HTTP, it's working as well. So not not look like where I am before. It's a bit different.
Okay, there we go. new updated version. Got it off the internet much better than the one I had. And okay, yeah, so that is how you do URL format or your work with HTTP and without it as well. So if you have any questions, feel free to pop me a message. And as usual, I look forward to seeing you in the next video.