Romain Hamel

Results 30 comments of Romain Hamel

This should be fixed by https://github.com/nuxt/ui/pull/1848 and wrapping your schema in `v.safeParser`.

I think I found the culprit: https://github.com/nuxt/ui/blob/dev/src/runtime/components/forms/Input.vue#L194 The `looseToNumber` function uses `parseFloat` which replaces `1.0` or `1,0` to `1`. Here's a few tests from the node console: ``` > parseFloat('1,0')...

That's right, the `@error` is meant to be fired when a submit fails, it's not triggered when validating after input events. I'll update the documentation to make it clearer. Do...

The validate-on prop allows to control which input events will trigger validation, for example `:validate-on="['blur']"` will validate inputs only when they are blurred. This doesn't submit the form. It just...

Errors are also exposed through the form's api so you can simplify your example with something like this: ```ts try { await form.value.validate() } catch (error) { onError(form.value.getErrors()) return }...

After discussing it with @benjamincanac, we'll add the option in the next major version.

I like the idea, but i think it would be a bit tricky since we don't have access to any information about event handlers using emits and can't really wait...

This can be achieved using VueUse's `useAsyncState` (https://vueuse.org/core/useAsyncState/) to wrap your event handlers: ```ts const { isReady, execute } = useAsyncState(async () => { // ... }, null, { immediate:...

I found out that we can declare emits using props while exploring ways to implement this, so it's actually possible to do it without changing the way components are used...

The validation can be triggered from the Form component (using `form.validate({ name: 'myinput' })`) or using `const { emitFormChange, emitFormBlur } = useFormGroup();` like @schillerenrico suggested.