I'm building a form with Apache Freemarker that contains data for a data structure. For some reason I have to prohibit the character * from ever being submitted into one of the fields. I have been able to successfully forbid the character using my input field like so:
<input type="text" name="permission" id="permission" class="form-control" pattern="^[^\*]*" value="<#if permission??>${permission}</#if>"/>
However, I can still input the * character. This is still fine to me, but what isn't is that one only gets the message, that the input is invalid, once one clicks send. This looks like this:
This does not only not match my style, but the message is rather unhelpful. How do I
- customize this box, if I even can.
- make the hint appear, as soon as someone enteres a forbidden character
