mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe.git
synced 2024-11-14 12:34:46 +00:00
make email validation conditional work
This commit is contained in:
parent
101eebb40b
commit
f7f8a579fa
1 changed files with 13 additions and 10 deletions
|
@ -14,15 +14,17 @@ const registration = {
|
|||
},
|
||||
captcha: {}
|
||||
}),
|
||||
validations: {
|
||||
user: {
|
||||
email: requiredIf('accountActivationRequired'),
|
||||
username: { required },
|
||||
fullname: { required },
|
||||
password: { required },
|
||||
confirm: {
|
||||
required,
|
||||
sameAsPassword: sameAs('password')
|
||||
validations () {
|
||||
return {
|
||||
user: {
|
||||
email: { required: requiredIf(() => this.accountActivationRequired) },
|
||||
username: { required },
|
||||
fullname: { required },
|
||||
password: { required },
|
||||
confirm: {
|
||||
required,
|
||||
sameAsPassword: sameAs('password')
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -43,7 +45,8 @@ const registration = {
|
|||
signedIn: (state) => !!state.users.currentUser,
|
||||
isPending: (state) => state.users.signUpPending,
|
||||
serverValidationErrors: (state) => state.users.signUpErrors,
|
||||
termsOfService: (state) => state.instance.tos
|
||||
termsOfService: (state) => state.instance.tos,
|
||||
accountActivationRequired: (state) => state.instance.accountActivationRequired
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
|
Loading…
Reference in a new issue