Skip to content

Commit 3d5aea1

Browse files
Barbapapazesbenjamincanac
authored andcommitted
fix(AuthForm): use error from form field (#4738)
1 parent 6231ac3 commit 3d5aea1

File tree

4 files changed

+83
-81
lines changed

4 files changed

+83
-81
lines changed

src/runtime/components/AuthForm.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ defineExpose({
200200
:name="field.name"
201201
:size="field.size"
202202
:required="field.required"
203+
:error="field.error"
203204
>
204205
<slot :name="`${field.name}-field`" v-bind="{ state, field }">
205206
<UCheckbox

test/components/AuthForm.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ describe('AuthForm', () => {
77
const fields = [{
88
name: 'email',
99
label: 'Email',
10-
type: 'text' as const
10+
type: 'text' as const,
11+
error: 'Invalid email format'
1112
}, {
1213
name: 'password',
1314
label: 'Password',

0 commit comments

Comments
 (0)