diff options
| author | raeno <just.raeno@gmail.com> | 2018-12-05 19:42:33 +0400 |
|---|---|---|
| committer | raeno <just.raeno@gmail.com> | 2018-12-05 19:42:33 +0400 |
| commit | 91a72d51fffb241bb7c9cba78ea2b5b47dce7db3 (patch) | |
| tree | 121422fda24fb7ef7d3711a7d824d3da32c2ac5a /src/components/registration/registration.js | |
| parent | f9ff839b1af7cdae2bc9ff5090844ea6b1fac6ac (diff) | |
Validate name presence on client-side as well
* remove email address validation, we have it covered by html itself and it's quite annoying
* add shakeError animation
* fix styles a bit
Diffstat (limited to 'src/components/registration/registration.js')
| -rw-r--r-- | src/components/registration/registration.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js index 67c052f1..8559633b 100644 --- a/src/components/registration/registration.js +++ b/src/components/registration/registration.js @@ -1,5 +1,5 @@ import { validationMixin } from 'vuelidate' -import { required, sameAs, email } from 'vuelidate/lib/validators' +import { required, sameAs } from 'vuelidate/lib/validators' import { mapActions, mapState } from 'vuex' import { SIGN_UP } from '../../mutation_types' @@ -8,6 +8,7 @@ const registration = { data: () => ({ user: { email: '', + fullname: '', username: '', password: '', confirm: '' @@ -16,8 +17,9 @@ const registration = { }), validations: { user: { - email: { required, email }, + email: { required }, username: { required }, + fullname: { required }, password: { required }, confirm: { required, @@ -57,7 +59,7 @@ const registration = { await this.signUp(this.user) this.$router.push('/main/friends') } catch (error) { - console.log("Registration failed: " + error) + console.log('Registration failed: ' + error) } } } |
