Commit 337dd4cbc511552670e3fe0fbe8a976d1707ed88
1 parent
708aeb6582
Exists in
master
and in
3 other branches
fix name & email validation in provider
Showing
1 changed file
with
2 additions
and
21 deletions
Show diff stats
src/pages/Provider.vue
... | ... | @@ -55,14 +55,6 @@ |
55 | 55 | </v-layout> |
56 | 56 | <v-layout> |
57 | 57 | <v-flex xs4 class="pt-4 subheading"> |
58 | - <label>Last Name:</label> | |
59 | - </v-flex> | |
60 | - <v-flex xs8> | |
61 | - <v-text-field v-model="editedItem.lastname" required></v-text-field> | |
62 | - </v-flex> | |
63 | - </v-layout> | |
64 | - <v-layout> | |
65 | - <v-flex xs4 class="pt-4 subheading"> | |
66 | 58 | <label>Email ID:</label> |
67 | 59 | </v-flex> |
68 | 60 | <v-flex xs8> |
... | ... | @@ -116,14 +108,6 @@ |
116 | 108 | </v-layout> |
117 | 109 | <v-layout> |
118 | 110 | <v-flex xs4> |
119 | - <h5 class="right my-3">Last Name:</h5> | |
120 | - </v-flex> | |
121 | - <v-flex xs8> | |
122 | - <h5 class="my-3 left">{{ editedItem.name }}</h5> | |
123 | - </v-flex> | |
124 | - </v-layout> | |
125 | - <v-layout> | |
126 | - <v-flex xs4> | |
127 | 111 | <h5 class="right">Email:</h5> |
128 | 112 | </v-flex> |
129 | 113 | <v-flex xs8> |
... | ... | @@ -235,10 +219,9 @@ export default { |
235 | 219 | "Please enter a date in the format dd/mm/yyyy" |
236 | 220 | }, |
237 | 221 | nameRules: [v => !!v || " First Name is required"], |
238 | - // lnameRules: [v => !!v || ' Last Name is required'], | |
239 | 222 | emailRules: [ |
240 | 223 | v => !!v || "E-mail is required", |
241 | - v => /.+@.+/.test(v) || "E-mail must be valid" | |
224 | + v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid' | |
242 | 225 | ], |
243 | 226 | pagination: { |
244 | 227 | rowsPerPage: 13 |
... | ... | @@ -260,14 +243,12 @@ export default { |
260 | 243 | editedItem: { |
261 | 244 | No: "", |
262 | 245 | Name: "", |
263 | - lastname: "", | |
264 | 246 | Email: "", |
265 | 247 | dob: "" |
266 | 248 | }, |
267 | 249 | defaultItem: { |
268 | 250 | No: "", |
269 | 251 | Name: "", |
270 | - lastname: "", | |
271 | 252 | Email: "", |
272 | 253 | dob: "" |
273 | 254 | } |
... | ... | @@ -360,7 +341,7 @@ export default { |
360 | 341 | |
361 | 342 | save() { |
362 | 343 | let editUsers = { |
363 | - name: this.editedItem.name + " " + this.editedItem.lastname, | |
344 | + name: this.editedItem.name, | |
364 | 345 | dob: this.editedItem.dob, |
365 | 346 | email: this.editedItem.email, |
366 | 347 | userId: this.editedItem.userId | ... | ... |