function is_valid_url(url) {
return /^((http|https)://)?([a-zA-Z0-9_][-_a-zA-Z0-9]{0,62}.)+([a-zA-Z0-9]{1,10})$/.test(url);
}
Enjoy 🙂
function is_valid_url(url) {
return /^((http|https)://)?([a-zA-Z0-9_][-_a-zA-Z0-9]{0,62}.)+([a-zA-Z0-9]{1,10})$/.test(url);
}
Enjoy 🙂
Leave a Comment