VUE.JS / FORM I need help with my subscription form, in Vue (without using any libraries for validation, so only using javascript validation): — Needs to have input for email and input for button: — Validates if the email is valid (right format) — Validates if the field is empty — Has feedback below the input field for error: ”Please enter valid email” and success - “We received your email” — With post method in PHP here's my code so far: Here's my code so far: Submit {{ errors.email }} {{ errors.email }}
VUE.JS / FORM I need help with my subscription form, in Vue (without using any libraries for validation, so only using javascript validation):
— Needs to have input for email and input for button:
— Validates if the email is valid (right format)
— Validates if the field is empty
— Has feedback below the input field for error: ”Please enter valid email” and success - “We received your email”
— With post method in PHP here's my code so far:
Here's my code so far:
<template>
<form @submit.prevent="register" method="post">
<div class="form-group">
<input type="email" placeholder="What's your email" v-model="user.email" />
<button type="submit">Submit</button>
</div>
<div class="error">{{ errors.email }}</div>
</form>
{{ errors.email }}
Step by step
Solved in 5 steps with 2 images