| Name | Type | Default |
|
arrow
# |
Boolean
|
true
|
Sets or gets whether the arrow of the hints will be shown.
<template>
<JqxValidator ref="myValidator" :rules="rules" :arrow="false">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
</script>
|
|
animation
# |
String
|
'fade'
|
Sets or gets the animation of showing, hiding the hints.
Possible Values:
'fade'
'none'
<template>
<JqxValidator ref="myValidator" :rules="rules" :animation="'none'">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
</script>
|
|
animationDuration
# |
Number
|
150
|
Sets or gets the duration of the animation used for showing/hiding the hints.
<template>
<JqxValidator ref="myValidator" :rules="rules" :animationDuration="3000">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
</script>
|
|
closeOnClick
# |
Boolean
|
true
|
Sets or gets whether the hints will be closed when the user click on them.
<template>
<JqxValidator ref="myValidator" :rules="rules" :closeOnClick="false">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
</script>
|
|
focus
# |
Boolean
|
true
|
Sets or gets whether the jqxValidator will focus the first invalid input.
<template>
<JqxValidator ref="myValidator" :rules="rules" :focus="false">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
</script>
|
|
hintType
# |
String
|
"tooltip"
|
Sets or gets the hint type. Possible values: 'tooltip' and 'label'.
<template>
<JqxValidator ref="myValidator" :rules="rules" :hintType="'label'">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
</script>
|
|
onError
# |
Function
|
null
|
Sets or gets callback which will be called on validation error.
<template>
<JqxValidator ref="myValidator" :rules="rules" :onError="onError">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
function onError() {
alert('You have not filled the form correctly!');
}
</script>
|
|
onSuccess
# |
Function
|
null
|
Sets or gets the callback which will be executed on success.
<template>
<JqxValidator ref="myValidator" :rules="rules" :onSuccess="onSuccess">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
function onSuccess() {
alert('You have filled the form correctly!');
}
</script>
|
|
position
# |
String
|
'right'
|
Sets or gets the default position of the hints.
<template>
<JqxValidator ref="myValidator" :rules="rules" :position="'left'">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
</script>
|
|
rules
# |
Array
|
[]
|
Sets jqxValidator rules. Format of a single rule is as follows:
{ input: 'selector-of-the-input',
message: 'Custom message on error',
action: 'Custom action (keyup, change...etc)',
rule: 'Build rule (ssn, phone, email...) or custom function',
position: 'Position of the hint (format pos:x,y)',
hintRender: 'Function for hint rendering' }
<template>
<JqxValidator ref="myValidator" :rules="rules">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
</script>
|
|
rtl
# |
Boolean
|
false
|
Sets or gets a value indicating whether the validation messages are displayed from the left side instead of the right.
<template>
<JqxValidator ref="myValidator" :rules="rules" :rtl="true">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
</script>
|
|
theme
# |
String
|
''
|
Sets the widget's theme.
<template>
<JqxValidator ref="myValidator"
:rules="rules" :theme="'material'">
<form id='testForm' action='./'>
<table class='register-table'>
<tr>
<td>Username:</td>
<td>
<input type='text' id='userInput' class='text-input' />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type='text' id='emailInput' class='text-input' />
</td>
</tr>
</table>
</form>
<jqxButton @click='submit()' :width='50'>Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from "vue";
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([{
input: '#userInput',
message: 'Username is required!',
action: 'blur',
rule: 'required'
}, {
input: '#emailInput',
message: 'Invalid e-mail!',
action: 'blur',
rule: 'email'
}, {
input: '#emailInput',
message: 'Email is required!',
action: 'blur',
rule: 'required'
}]);
function submit() {
myValidator.value.validate();
}
</script>
|
|
|
|
validationError
# |
Event
|
|
This is triggered when the form is validated with some errors.
Code examples #
Bind to the validationError event of jqxValidator.
<template>
<JqxValidator ref="myValidator" @validationError="onValidationError($event)" :rules="rules">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
function onValidationError(event) {
alert('do something...');
}
</script>
|
|
validationSuccess
# |
Event
|
|
This is triggered when the form is validated without any errors.
Code examples #
Bind to the validationSuccess event of jqxValidator.
<template>
<JqxValidator ref="myValidator" @validationSuccess="onValidationSuccess($event)" :rules="rules">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
function onValidationSuccess(event) {
alert('do something...');
}
</script>
|
|
|
| Name | Arguments | Return Type |
|
hideHint
# |
id
|
None
|
Hide all hints for a specific input.
<template>
<JqxValidator ref="myValidator" :rules="rules">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
onMounted(() => {
myValidator.value.validate();
myValidator.value.hideHint('#userInput');
});
</script>
|
|
hide
# |
None
|
None
|
Hiding all hints for the current form.
<template>
<JqxValidator ref="myValidator" :rules="rules">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
onMounted(() => {
myValidator.value.validate();
myValidator.value.hide();
});
</script>
|
|
updatePosition
# |
None
|
None
|
Updating the positions of all hints. This is useful for example on window resize.
<template>
<JqxValidator ref="myValidator" :rules="rules">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
onMounted(() => {
myValidator.value.validate();
myValidator.value.updatePosition();
});
</script>
|
|
validate
# |
htmlElement
|
None
|
Validating the whole form.
<template>
<JqxValidator ref="myValidator" :rules="rules">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
onMounted(() => {
myValidator.value.validate();
});
</script>
|
|
validateInput
# |
id
|
None
|
Validates a single input. This method accepts a single parameter which is selector of the input you want to validate. Notice that this selector should be the same like the one you've passed in the rules array.
<template>
<JqxValidator ref="myValidator" :rules="rules">
<form id="testForm" action="./">
<table class="register-table">
<tr>
<td>Username:</td>
<td>
<input type="text" id="userInput" class="text-input" />
</td>
</tr>
<tr>
<td>E-mail:</td>
<td>
<input type="text" id="emailInput" class="text-input" />
</td>
</tr>
</table>
</form>
<jqxButton @click="submit()" :width="50">Submit</jqxButton>
</JqxValidator>
</template>
<script setup>
import { onMounted, ref } from 'vue';
import JqxValidator from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxvalidator.vue';
import JqxButton from 'jqwidgets-scripts/jqwidgets-vue3/vue_jqxbuttons.vue';
const myValidator = ref(null);
const rules = ref([
{ input: '#userInput', message: 'Username is required!', action: 'blur', rule: 'required' },
{ input: '#emailInput', message: 'Invalid e-mail!', action: 'blur', rule: 'email' },
{ input: '#emailInput', message: 'Email is required!', action: 'blur', rule: 'required' }
]);
function submit() {
myValidator.value.validate();
}
onMounted(() => {
myValidator.value.validateInput('#userInput');
});
</script>
|