Commit 551457f1 authored by Babin Egor's avatar Babin Egor

upgrade form

parent 6e276fdd
......@@ -90,7 +90,8 @@
"object-fit-images": "^3.2.3",
"svg4everybody": "^2.1.8",
"vee-validate": "^3.0.3",
"vue": "^2.6.10"
"vue": "^2.6.10",
"vue-the-mask": "^0.11.1"
},
"husky": {
"hooks": {
......
......@@ -3,6 +3,9 @@ import { ValidationProvider, extend } from 'vee-validate';
import { required, email } from 'vee-validate/dist/rules';
import $ from 'jquery';
import axios from 'axios';
import 'vue-the-mask'
extend('required', required);
extend('email', email);
......@@ -748,6 +751,7 @@ Vue.component('app-registration-form', {
},
valdatePhone(phone) {
phone = phone.replace(/[^0-9]/g, '');
var re = /^\d[\d\(\)\ -]{7,14}\d$/;
var valid = re.test(phone);
return valid;
......@@ -821,13 +825,13 @@ Vue.component('app-registration-form', {
<!-- Debug --->
<!--
<div style="display: block; position: fixed; right: 0;top: 0%; background-color:#fff; z-index:1000; width: 300px; padding: 10px; border: 1px solid #999;">
<pre>
{{ fieldsVal[currentPT] }}
</pre>
</div>
-->
<!-- end Debug --->
......@@ -1146,7 +1150,7 @@ Vue.component('app-registration-form', {
<span class="field-text__input-wrap">
<input type="text"
placeholder="Контактный телефон"
v-mask="'##/##/####'"
v-mask="'+7 (###) ###-##-##'"
class="field-text__input"
v-model="fieldsVal.juridical.companyContactPhone"
>
......
Markdown is supported
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