Register - basic email input validation
This commit is contained in:
parent
c8e1b5d80d
commit
0c006cc09c
@ -10,6 +10,7 @@
|
|||||||
"got": "^11.8.2",
|
"got": "^11.8.2",
|
||||||
"redaxios": "^0.4.1",
|
"redaxios": "^0.4.1",
|
||||||
"toastify-js": "^1.9.3",
|
"toastify-js": "^1.9.3",
|
||||||
|
"validator": "^13.5.2",
|
||||||
"vue": "^3.0.5",
|
"vue": "^3.0.5",
|
||||||
"vue-phone-number-input": "^1.1.10",
|
"vue-phone-number-input": "^1.1.10",
|
||||||
"vue-router": "4"
|
"vue-router": "4"
|
||||||
|
@ -47,13 +47,16 @@
|
|||||||
<span class="font-bold">*</span>
|
<span class="font-bold">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
|
v-model="userdetails.mail"
|
||||||
name="email_address"
|
name="email_address"
|
||||||
id="email_address"
|
id="email_address"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="E-Mail Adresse"
|
placeholder="E-Mail Adresse"
|
||||||
type="text"
|
type="email"
|
||||||
class="dark:bg-gray-800 mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 rounded-md p-2"
|
:class="{ 'border-red-500': (!isEmail(userdetails.mail)), 'border-gray-300': (isEmail(userdetails.mail)) }"
|
||||||
|
class="dark:bg-gray-800 mt-1 block w-full shadow-sm rounded-l-md sm:text-sm border bg-gray-50 text-gray-100 rounded-md p-2"
|
||||||
/>
|
/>
|
||||||
|
<p class="text-sm">Bitte geben Sie eine gültige E-Mail Adresse an</p>
|
||||||
<div class="grid grid-cols-6 mt-6">
|
<div class="grid grid-cols-6 mt-6">
|
||||||
<div class="col-span-6"></div>
|
<div class="col-span-6"></div>
|
||||||
<div class="flex items-start col-span-6">
|
<div class="flex items-start col-span-6">
|
||||||
@ -155,7 +158,9 @@
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import axios from "redaxios";
|
import axios from "redaxios";
|
||||||
import Toastify from "toastify-js";
|
import Toastify from "toastify-js";
|
||||||
|
import isEmail from 'validator/es/lib/isEmail';
|
||||||
|
|
||||||
|
let userdetails = ref({ firstname: "", lastname: "", middlename: "", mail: "" });
|
||||||
let provide_address = ref(false);
|
let provide_address = ref(false);
|
||||||
let agb_accepted = ref(false);
|
let agb_accepted = ref(false);
|
||||||
function login() {
|
function login() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user