Skip to content
Snippets Groups Projects
Commit 91978c1b authored by VIktorGrev's avatar VIktorGrev
Browse files

feat: Adding form validation loginform

parent 859ad409
No related branches found
No related tags found
No related merge requests found
Pipeline #278342 failed
...@@ -98,6 +98,9 @@ function toFeedback() { ...@@ -98,6 +98,9 @@ function toFeedback() {
router.push('/feedback') router.push('/feedback')
} }
function toFriends() {
router.push('/friends')
}
function toUserProfile() { function toUserProfile() {
router.push('/profile') router.push('/profile')
......
...@@ -32,7 +32,14 @@ const handleSubmit = async () => { ...@@ -32,7 +32,14 @@ const handleSubmit = async () => {
console.log(emailRef.value) console.log(emailRef.value)
console.log(passwordRef.value) console.log(passwordRef.value)
formRef.value.classList.add("was-validated") formRef.value.classList.add("was-validated")
const form = formRef.value;
if (!form.checkValidity()) {
return;
}
const loginUserPayload: LoginRequest = { const loginUserPayload: LoginRequest = {
email: emailRef.value, email: emailRef.value,
password: passwordRef.value password: passwordRef.value
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment