I'm trying to make a register page and my sybmit doesn't work. Does anyone know how to fix it? This is my code
<template>
<div>
<h1>Register</h1>
<ui-form
type="|"
item-margin-bottom="16"
action-align="center"
v-on:submit.prevent="register()"
>
<template #default="{ actionClass }">
<ui-form-field>
<ui-textfield
v-model="email"
required
helper-text-id="email-field-helper-text"
input-type="email"
>
Email Address
</ui-textfield>
<ui-textfield-helper
v-if="controls.helperText"
id="email-field-helper-text"
:visible="controls.isVisible"
>
Must be like me@example.com
</ui-textfield-helper>
</ui-form-field>
<ui-form-field>
<label>Password:</label>
<ui-textfield
v-model="password"
input-type="password"
required
pattern=".{8,}"
helper-text-id="pw-validation-msg"
:attrs="{ autocomplete: 'current-password' }"
>Choose password</ui-textfield
>
<ui-textfield-helper id="pw-validation-msg" visible validMsg>
Must be at least 8 characters long
</ui-textfield-helper>
</ui-form-field>
<ui-form-field :class="actionClass">
<ui-button raised nativeType="submit" type="submit">Submit</ui-button>
<ui-button outlined>Cancel</ui-button>
</ui-form-field>
</template>
</ui-form>
<div>
{{ mesaj }}
</div>
</div>
</template>
I've also tried this instead of v-on:submit.prevent="register()"
@submit.prevent="register()" or @submit.prevent.native
Also, if I put @click=register() on my button it does register all the values, even if they are not valid
