Skip to content

Commit

Permalink
refactor(components): form v2 follow-ups
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuagraber committed Oct 8, 2024
1 parent 7ebd780 commit c80a46e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/FormV2/PdapFormV2.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<form :id="id" :name="name" class="pdap-form" @submit="submit">
<form :id="id" :name="name" class="pdap-form" @submit.prevent="submit">
<slot v-if="$slots.error" name="error" />
<div
v-else-if="typeof errorMessage === 'string'"
Expand Down
5 changes: 5 additions & 0 deletions src/demo/pages/FormV2Demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
>
<InputText
:id="INPUT_TEXT_NAME"
autocomplete="off"
:name="INPUT_TEXT_NAME"
:placeholder="PLACEHOLDER"
>
Expand All @@ -18,6 +19,7 @@

<InputPassword
:id="INPUT_PASSWORD_NAME"
autocomplete="off"
:name="INPUT_PASSWORD_NAME"
placeholder="Password"
label="Type your password here"
Expand Down Expand Up @@ -59,6 +61,9 @@ const SCHEMA = [
{
name: INPUT_PASSWORD_NAME,
validators: {
required: {
value: true,
},
password: {
value: true,
message: 'Your password should be a valid password',
Expand Down

0 comments on commit c80a46e

Please # to comment.