Validator
Show a native field constraint and its correction.
HTML
<form class="rl-validation-example" data-rl-check-form><label class="rl-label">Catalog SKU<input class="rl-input" name="sku" required pattern="[A-Z]{2}-[0-9]{4}" placeholder="RL-2040"></label><small>Use two uppercase letters, a hyphen and four digits.</small><button class="rl-button" type="submit">Check SKU</button><output role="status"></output></form>This checks the format locally. Use the inventory form to enforce a unique SKU on the server.
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">
<link rel="stylesheet" href="/mero-composition.css">
<script defer src="/mero.js"></script>
<script defer src="/mero-composition.js"></script>