Update validation example

pull/6674/head
Cagatay Civici 2024-10-26 17:30:14 +03:00
parent ea3b3c38fe
commit 0a150e9171
1 changed files with 25 additions and 19 deletions

View File

@ -4,13 +4,14 @@
</DocSectionText>
<div class="card flex justify-center">
<div class="flex flex-col gap-4">
<div class="flex flex-wrap gap-2">
<Message severity="error" icon="pi pi-times-circle" class="mb-2">Validation Failed</Message>
<div class="flex flex-col">
<InputText placeholder="Username" aria-label="username" invalid />
<Message severity="error">Username is required</Message>
<Message severity="error" variant="plain" size="small">Username is required</Message>
</div>
<div class="flex flex-wrap gap-2">
<div class="flex flex-col">
<InputText placeholder="Email" aria-label="email" invalid />
<Message severity="error" icon="pi pi-times-circle" />
<Message severity="error" variant="plain" size="small">Email is not valid</Message>
</div>
</div>
</div>
@ -23,26 +24,30 @@ export default {
return {
code: {
basic: `
<div class="flex flex-wrap gap-2">
<div class="flex flex-col gap-4">
<Message severity="error" icon="pi pi-times-circle" class="mb-2">Validation Failed</Message>
<div class="flex flex-col">
<InputText placeholder="Username" aria-label="username" invalid />
<Message severity="error">Username is required</Message>
<Message severity="error" variant="plain" size="small">Username is required</Message>
</div>
<div class="flex flex-wrap gap-2">
<div class="flex flex-col">
<InputText placeholder="Email" aria-label="email" invalid />
<Message severity="error" icon="pi pi-times-circle" />
<Message severity="error" variant="plain" size="small">Email is not valid</Message>
</div>
</div>
`,
options: `
<template>
<div class="card flex justify-center">
<div class="flex flex-col gap-4">
<div class="flex flex-wrap gap-2">
<Message severity="error" icon="pi pi-times-circle" class="mb-2">Validation Failed</Message>
<div class="flex flex-col">
<InputText placeholder="Username" aria-label="username" invalid />
<Message severity="error">Username is required</Message>
<Message severity="error" variant="plain" size="small">Username is required</Message>
</div>
<div class="flex flex-wrap gap-2">
<div class="flex flex-col">
<InputText placeholder="Email" aria-label="email" invalid />
<Message severity="error" icon="pi pi-times-circle" />
<Message severity="error" variant="plain" size="small">Email is not valid</Message>
</div>
</div>
</div>
@ -55,13 +60,14 @@ export default {
<template>
<div class="card flex justify-center">
<div class="flex flex-col gap-4">
<div class="flex flex-wrap gap-2">
<Message severity="error" icon="pi pi-times-circle" class="mb-2">Validation Failed</Message>
<div class="flex flex-col">
<InputText placeholder="Username" aria-label="username" invalid />
<Message severity="error">Username is required</Message>
<Message severity="error" variant="plain" size="small">Username is required</Message>
</div>
<div class="flex flex-wrap gap-2">
<div class="flex flex-col">
<InputText placeholder="Email" aria-label="email" invalid />
<Message severity="error" icon="pi pi-times-circle" />
<Message severity="error" variant="plain" size="small">Email is not valid</Message>
</div>
</div>
</div>