Add Domain Verification on Onboarding Wizard

This commit is contained in:
Raish
2021-06-18 09:51:19 +00:00
committed by Mohit Panjwani
parent 2fb46a4ab3
commit 8eb47b553e
26 changed files with 1549 additions and 1401 deletions

View File

@ -1,4 +1,4 @@
import i18n from '../plugins/i18n';
import i18n from '../plugins/i18n'
export default {
addClass(el, className) {
@ -51,9 +51,9 @@ export default {
.replace(/(\d{3})(?=\d)/g, '$1' + thousand_separator)
let precisionText = precision
? decimal_separator +
Math.abs(amount - i)
.toFixed(precision)
.slice(2)
Math.abs(amount - i)
.toFixed(precision)
.slice(2)
: ''
let combinedAmountText =
negativeSign + thousandText + amountText + precisionText
@ -104,9 +104,9 @@ export default {
.replace(/(\d{3})(?=\d)/g, '$1' + thousand_separator)
let precisionText = precision
? decimal_separator +
Math.abs(amount - i)
.toFixed(precision)
.slice(2)
Math.abs(amount - i)
.toFixed(precision)
.slice(2)
: ''
let combinedAmountText =
negativeSign + thousandText + amountText + precisionText
@ -130,11 +130,11 @@ export default {
}
let pattern = new RegExp(
'^(https?:\\/\\/)?' + // protocol
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
'(\\#[-a-z\\d_]*)?$',
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
'(\\#[-a-z\\d_]*)?$',
'i'
) // fragment locator
@ -142,12 +142,20 @@ export default {
},
checkValidDomainUrl(url) {
if (url.includes('localhost')) {
if (url.includes('localhost') || url.includes('127.0.0.1')) {
return true
}
let pattern = new RegExp(
'^([0-9A-Za-z-\\.@:%_+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?'
)
'^(https?:\\/\\/)?' + // protocol
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // domain name
'((\\d{1,3}\\.){3}\\d{1,3}))' + // OR ip (v4) address
'(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // port and path
'(\\?[;&a-z\\d%_.~+=-]*)?' + // query string
'(\\#[-a-z\\d_]*)?$',
'i'
) // fragment locator
return !!pattern.test(url)
},