Skip to content

Commit

Permalink
doc: add missed loadDefaultFeedbackMessages to input-email document
Browse files Browse the repository at this point in the history
  • Loading branch information
ryubro committed Apr 1, 2024
1 parent 85f74a6 commit 61f644c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/components/input-email/use-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

```js preview-story
export const faultyPrefilled = () => html`
<lion-input-email .modelValue=${'foo'} label="Email"></lion-input-email>
`;
export const faultyPrefilled = () => {
loadDefaultFeedbackMessages();

return html` <lion-input-email .modelValue=${'foo'} label="Email"></lion-input-email> `;
};
```

## Custom Validator
Expand Down

0 comments on commit 61f644c

Please sign in to comment.