I've been working with a simple pattern like this:
<input type="text" pattern="[a-z]{2}" required ../>
However, it never seems to be valid. The pattern doesn't seem to work as expected.
I have only tested it in Firefox so far.
Is there something I need to activate or adjust to make it work?
This is a snippet from my template:
<section class="inscription">
<h1>Inscription</h1>
<form method="post" enctype="multipart/form-data">
<div class="formu-inscription">
<label for="nom"> Nom : </label> <br/><input type="text" id="nom" name="nom" value="{set_value('nom')}" pattern="[a-z]{2}" required /> <br />
{form_error('nom')}
/* other inputs */