svelte-forms icon indicating copy to clipboard operation
svelte-forms copied to clipboard

{form} contradicts with html <form> element tag

Open style2joy opened this issue 3 years ago • 2 comments

When the <input> fields are not wrapped in <form> browser warns about missing form tag like

[DOM] Password field is not contained in a form

when <form> tag is used, Svelte warns about:

Plugin svelte: <form> will be treated as an HTML element unless it begins with a capital letter

Please suggest a way to fix/workaround this.

style2joy avatar Apr 24 '22 14:04 style2joy

I just import form with an alias:

import { field, form as svelteForm } from 'svelte-forms';

JohnGallego avatar Apr 26 '22 17:04 JohnGallego

I find the need to rename an import is counter to the minimal approach of Svelte. I would prefer having the form just called svelteForm in the library.

Of course this would break backwards compatibility... But perhaps a thing to consider for v3?

c00 avatar Jul 22 '22 09:07 c00