diff options
| author | Mark Felder <feld@FreeBSD.org> | 2020-02-24 11:19:00 -0600 |
|---|---|---|
| committer | Mark Felder <feld@FreeBSD.org> | 2020-02-24 11:19:00 -0600 |
| commit | 86561592d002b08d6b2cd9549e8057a4ffd091cb (patch) | |
| tree | 97addd3002a6bb2c0dd3d48710f234b2fd760069 /src/components/registration | |
| parent | d19c64314ff08391a2649681e6b64d052e600059 (diff) | |
First attempt at not requiring email address for registration
Diffstat (limited to 'src/components/registration')
| -rw-r--r-- | src/components/registration/registration.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js index ace8cc7c..fd2942a5 100644 --- a/src/components/registration/registration.js +++ b/src/components/registration/registration.js @@ -1,5 +1,5 @@ import { validationMixin } from 'vuelidate' -import { required, sameAs } from 'vuelidate/lib/validators' +import { required, requiredIf, sameAs } from 'vuelidate/lib/validators' import { mapActions, mapState } from 'vuex' const registration = { @@ -16,7 +16,7 @@ const registration = { }), validations: { user: { - email: { required }, + email: requiredIf('accountActivationRequired'), username: { required }, fullname: { required }, password: { required }, @@ -24,6 +24,11 @@ const registration = { required, sameAsPassword: sameAs('password') } + }, + nested: { + required: requiredIf(function (nestedModel) { + return this.accountActivationRequired + }) } }, created () { |
