checkDisUrlTip = () => {
const { brandWebsite } = this.props;
if(brandWebsite !== "") {
let reg=/^((https|http|ftp|rtsp|mms)?:\/\/)[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]/;
if(!reg.test(brandWebsite)){
this.setState({
disURLtip:true
})
} else {
this.setState({
disURLtip:false
})
}
}
}
url正则校验
最新推荐文章于 2023-01-06 11:14:01 发布