mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
Merge branch 'wizard-refactor' into 'master'
refactor checkValidUrl method See merge request mohit.panjvani/crater-web!248
This commit is contained in:
@ -128,6 +128,14 @@ export default {
|
||||
},
|
||||
|
||||
checkValidUrl(url) {
|
||||
if (
|
||||
url.includes('http://localhost') ||
|
||||
url.includes('http://127.0.0.1') ||
|
||||
url.includes('https://localhost') ||
|
||||
url.includes('https://127.0.0.1')
|
||||
) {
|
||||
return true
|
||||
}
|
||||
let pattern = new RegExp(
|
||||
'^(https?:\\/\\/)?' + // protocol
|
||||
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
|
||||
|
||||
Reference in New Issue
Block a user