sveltekit-superforms
sveltekit-superforms copied to clipboard
`customValidity` for shadcn components
customValidity works well for input fields but it would be great to support shadcn components. For example, shadcn's Select component renders button and div tags so the tooltip doesn't appear when trying to enforce a user to select an option from the dropdown.
Hi, customValidity uses the name attribute to find the correct field, so the trick should be to add a matching name attribute to the native html field that is eventually generated by shadcn.