Skip to content

Commit 4c02297

Browse files
committed
doc: add missed loadDefaultFeedbackMessages to input-email document
1 parent b89a1b6 commit 4c02297

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

docs/components/input-email/use-cases.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
```js script
44
import { html } from '@mdjs/mdjs-preview';
5+
import { loadDefaultFeedbackMessages } from '@lion/ui/validate-messages.js';
56
import { Validator } from '@lion/ui/form-core.js';
67
import '@lion/ui/define/lion-input-email.js';
78
```
@@ -13,9 +14,11 @@ When prefilling with a faulty input, an error feedback message will show.
1314
Use `loadDefaultFeedbackMessages` to get our default feedback messages displayed on it.
1415

1516
```js preview-story
16-
export const faultyPrefilled = () => html`
17-
<lion-input-email .modelValue=${'foo'} label="Email"></lion-input-email>
18-
`;
17+
export const faultyPrefilled = () => {
18+
loadDefaultFeedbackMessages();
19+
20+
return html` <lion-input-email .modelValue=${'foo'} label="Email"></lion-input-email> `;
21+
};
1922
```
2023

2124
## Custom Validator

0 commit comments

Comments
 (0)