Commit e0608135 authored by Mycha's avatar Mycha
Browse files

add validations to userprofile

parent b975c302
Pipeline #376 passed with stage
in 2 minutes and 7 seconds
This diff is collapsed.
......@@ -50,9 +50,12 @@
<label>Reset password</label>
<md-input v-model="newPassword" type="password"></md-input>
</md-field>
<b-form-invalid-feedback :force-show="!$v.newPassword.minLength">
Please enter a password with at least 6 characters.
</b-form-invalid-feedback>
</div>
<div class="md-layout-item md-size-50" v-show="showPasswordForm">
<md-button class="md-raised md-success" @click="resetUserPassword">
<md-button class="md-raised md-success" @click="resetUserPassword" :disabled="$v.newPassword.$invalid">
Reset password
</md-button>
</div>
......@@ -64,7 +67,7 @@
<script>
import _ from 'lodash'
import { mapGetters, mapActions } from 'vuex'
import { required, email } from 'vuelidate/lib/validators'
import { required, email, minLength } from 'vuelidate/lib/validators'
export default {
name: 'edit-profile-form',
......@@ -82,6 +85,10 @@ export default {
name: {
required
}
},
newPassword: {
required,
minLength: minLength(6)
}
},
data () {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment