URL String validator - Node.js Network

Node.js examples for Network:URL

Description

URL String validator

Demo Code

  isUrl: function(url){
    if(/^(http:\/\/(www)?.|https:\/\/(www)?.|ftp:\/\/(www)?.|(www)?.){1}([0-9A-Za-z]+\.)/.test(url)){
      return true;
    }else{//ww w .  j av a  2  s  . com
      return false;
    }
  }

Related Tutorials