Skip to content

Search Feitio

↵ opens the first↑↓ chooseEsc closes

ErrorMessage

The message saying what to fix in a field, right below it.

On this page

Playground

Use a time between 00:00 and 23:59
Background
HTML
<div class="feitio-field"><label class="feitio-label" for="pg-em">Time</label><input class="feitio-input" aria-invalid="true" aria-describedby="pg-em-error" data-width="10" id="pg-em" value="25:00"><span class="feitio-error-message" id="pg-em-error"><svg class="feitio-icon" aria-hidden="true"><use href="/feitio/icons/sprite.svg#feitio-close"></use></svg>Use a time between 00:00 and 23:59</span></div>

When to use

When not to use

Examples

Time
Use a time between 00:00 and 23:59

Below the field

Wine, bold, with the icon, space-1 below the control.

Show code
HTML
<div class="feitio-field">
  …
  <span class="feitio-error-message" id="hora-erro">
    <svg class="feitio-icon" aria-hidden="true">…</svg>Use um horário entre 00:00 e 23:59
  </span>
</div>

Do and don’t

Do

Write the email as name@example.com

Says exactly what to do to get it right.

Don’t

Invalid email!

"Invalid" does not say what is wrong, and the exclamation mark shouts.

Writing

Accessibility

Attributes

AttributeValuesWhat for
class="feitio-error-message"requiredWine, bold, with the icon.
idtextSo the field can point to it with aria-describedby.
Top