| | |
| | | <div class="ques-header__input-block"> |
| | | <span>Email:</span> |
| | | <input class="ques-header__input" |
| | | :class="{ 'is-invalid': !emailValid}" |
| | | placeholder="請輸入" |
| | | v-model="myRequest.email"> |
| | | </div> |
| | | <div class="error mt-5 mb-5" style="margin-left:65px"> |
| | | <span v-show="!emailValid">Email格式有誤</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | : true; |
| | | } |
| | | |
| | | get emailValid() { |
| | | const rule = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; |
| | | return this.myRequest.email ? rule.test(this.myRequest.email) : true; |
| | | } |
| | | |
| | | get userInfo(): RegisterInfo { |
| | | const initUserInfo = JSON.parse(localStorage.getItem('userInfo')!); |
| | | return initUserInfo; |
| | |
| | | |
| | | get isDisabledSubmitBtn(): boolean { |
| | | return _.includes(this.myRequest.contactType,ContactType.PHONE) |
| | | ? !this.isHopeContactTimeDone() |
| | | ? !this.isHopeContactTimeDone() || !this.emailValid |
| | | : !this.phoneValid; |
| | | } |
| | | |