mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Form validation example updates
This commit is contained in:
parent
c317262830
commit
f76b40cb06
23 changed files with 117 additions and 122 deletions
|
@ -3,7 +3,7 @@
|
|||
<p><a href="https://vee-validate.logaretm.com/v4/">VeeValidate</a> is a popular library for handling forms in Vue.</p>
|
||||
</DocSectionText>
|
||||
<div class="card flex justify-content-center">
|
||||
<form @submit="onSubmit" class="flex flex-column gap-2">
|
||||
<form @submit="onSubmit" class="flex flex-column align-items-center gap-2">
|
||||
<Knob v-model="value" aria-describedby="text-error" />
|
||||
<small id="text-error" class="p-error">{{ errorMessage || ' ' }}</small>
|
||||
<Button type="submit" label="Submit" />
|
||||
|
@ -24,7 +24,7 @@ export default {
|
|||
|
||||
function validateField(value) {
|
||||
if (!value) {
|
||||
return 'Value is required.';
|
||||
return 'The value must be greater than zero.';
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -76,7 +76,7 @@ export default {
|
|||
|
||||
function validateField(value) {
|
||||
if (!value) {
|
||||
return 'Value is required.';
|
||||
return 'The value must be greater than zero.';
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -115,7 +115,7 @@ const toast = useToast();
|
|||
|
||||
function validateField(value) {
|
||||
if (!value) {
|
||||
return 'Value is required.';
|
||||
return 'The value must be greater than zero.';
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue