Fix validation bugs
This commit is contained in:
parent
40395250cc
commit
811d75f03f
|
@ -152,7 +152,7 @@ export default {
|
|||
!this.contributionType ||
|
||||
(!this.isLoggedIn && this.contributionType !== 'anonymous') ||
|
||||
this.hasErrorName.invalid ||
|
||||
this.hasErrorWallet
|
||||
this.hasErrorWallet.invalid
|
||||
)
|
||||
}
|
||||
},
|
||||
|
|
|
@ -37,7 +37,7 @@ const getters = {
|
|||
hasErrorWallet: (state) => {
|
||||
const ADDRESS_REGEX = /^0x[a-fA-F0-9]{40}$/
|
||||
const wallet = state.wallet
|
||||
if (wallet === null || wallet === '') {
|
||||
if (wallet === null || wallet === '' || wallet === undefined) {
|
||||
return { invalid: false, msg: '' }
|
||||
}
|
||||
if (!ADDRESS_REGEX.test(wallet)) {
|
||||
|
|
Loading…
Reference in New Issue