Field Error
Associate a validation error with the field that needs attention.
This slug is already in use.
HTML
<div class="rl-scope" data-rl-scope>
<div class="rl-field">
<label class="rl-label" for="demo-field-error">Workspace slug</label>
<input class="rl-input" id="demo-field-error" name="slug" value="studio" aria-invalid="true" aria-describedby="demo-field-error-message">
<p class="rl-field-error" id="demo-field-error-message">This slug is already in use.</p>
</div>
</div>Render the invalid state only when the value has failed validation.
Use in your app
Copy these tags into your page head once. Serve the files at the paths shown, then add the example’s template to your page.
Page assets
<link rel="stylesheet" href="/mero.css">
<script defer src="/mero.js"></script>