Browse Source

fix(gui): email validation

Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
pull/341/head
Pranav C 3 years ago
parent
commit
4a5c8756b4
  1. 3
      packages/nc-gui/pages/user/authentication/signup/_token.vue
  2. 3
      packages/nc-gui/pages/user/password/forgot.vue
  3. 4
      packages/nc-gui/pages/user/password/reset/form.vue
  4. 4
      packages/nc-gui/pages/user/password/reset/index.vue
  5. 4
      packages/nc-gui/pages/user/settings/index.vue
  6. 4
      packages/nc-gui/pages/user/settings/password.vue

3
packages/nc-gui/pages/user/authentication/signup/_token.vue

@ -230,6 +230,7 @@
// "./libs"
// );
import {mapGetters, mapActions} from 'vuex'
import {isEmail} from "@/helpers";
// import VueRecaptcha from 'vue-recaptcha';
export default {
@ -253,7 +254,7 @@ export default {
formRules: {
email: [
v => !!v || 'E-mail is required',
v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid'
v => isEmail(v) || 'E-mail must be valid'
],
password: [
v => (this.PasswordValidate(v)) || this.passwordValidateMsg

3
packages/nc-gui/pages/user/password/forgot.vue

@ -63,6 +63,7 @@
<script>
import VueRecaptcha from 'vue-recaptcha';
import {isEmail} from "@/helpers";
export default {
@ -78,7 +79,7 @@
formRules: {
email: [
v => !!v || 'E-mail is required',
v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid'
v => isEmail(v) || 'E-mail must be valid'
],
},
formUtil: {

4
packages/nc-gui/pages/user/password/reset/form.vue

@ -68,6 +68,8 @@
</template>
<script>
import {isEmail} from "@/helpers";
export default {
data() {
return {
@ -80,7 +82,7 @@
formRules: {
email: [
v => !!v || 'E-mail is required',
v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid'
v => isEmail(v) || 'E-mail must be valid'
],
},

4
packages/nc-gui/pages/user/password/reset/index.vue

@ -50,6 +50,8 @@
</template>
<script>
import {isEmail} from "@/helpers";
export default {
data() {
return {
@ -63,7 +65,7 @@
formRules: {
email: [
v => !!v || 'E-mail is required',
v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid'
v => isEmail(v) || 'E-mail must be valid'
],
password: [
v => (this.PasswordValidate(v)) || this.passwordValidateMsg

4
packages/nc-gui/pages/user/settings/index.vue

@ -158,6 +158,8 @@
</template>
<script>
import {isEmail} from "@/helpers";
export default {
data() {
return {
@ -194,7 +196,7 @@
formRules: {
email: [
v => !!v || 'E-mail is required',
v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid'
v => isEmail(v) || 'E-mail must be valid'
],
password: [
[v => !!v || 'Password is required'],

4
packages/nc-gui/pages/user/settings/password.vue

@ -99,6 +99,8 @@
</template>
<script>
import {isEmail} from "@/helpers";
export default {
data() {
return {
@ -115,7 +117,7 @@
formRules: {
email: [
v => !!v || 'E-mail is required',
v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid'
v => isEmail(v) || 'E-mail must be valid'
],
password: [
v => !!v || 'Password is required'

Loading…
Cancel
Save