校验 以 http 或者 https 开头的url

   let reUrl = /(http|https):\/\/([\w.]+\/?)\S*/
                    if (reUrl.test(values.url) === false) {
                      return this.$message.error('请输入以 http 或者 https 开头的url')
                    }

 

posted @ 2020-03-13 14:37  1点  阅读(945)  评论(0编辑  收藏  举报