nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
https://ui.nuxt.com
MIT License
4.06k stars 515 forks source link

[UForm] How to add validation to custom input #1983

Closed hamonCordova closed 3 months ago

hamonCordova commented 3 months ago

Description

I've created a custom input component (using normal HTML input) and put it inside a UForm -> FormGroup, but it doesn't show any errors when validate. How can i achive this?

evanstinger commented 3 months ago

Do you mean, after your validation logic ran, you want to display the error message? You need to conditionally show it.

spencerjsmall commented 3 months ago

@hamonCordova https://github.com/nuxt/ui/issues/1573

hamonCordova commented 3 months ago

Thanks!

On Fri, Jul 26, 2024, 14:32 Spencer Small @.***> wrote:

@hamonCordova https://github.com/hamonCordova #1573 https://github.com/nuxt/ui/issues/1573

— Reply to this email directly, view it on GitHub https://github.com/nuxt/ui/issues/1983#issuecomment-2253190472, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIJZ6KZIVEXXL3KKPGPXUXTZOKB4RAVCNFSM6AAAAABLNGAN7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJTGE4TANBXGI . You are receiving this because you were mentioned.Message ID: @.***>