Open Bk2 opened 5 years ago
When defining a data-input-regex for a text field. The entire string is only evaluated when the user starts to submit input.
Consider a text input field for entering phone numbers created using the following code:
<input aria-required="true" maxlength="20" class="form-control form-input " type="text" name="plejeforaeldre[0].telefonnummer" value="" id="plejeforaeldre[0].telefonnummer" data-input-regex="^(\+|\d)[0-9]*$">
This only allows for entering the '+' if the field is empty. It is not possible to first write a set of numbers and then later add the '+'
When defining a data-input-regex for a text field. The entire string is only evaluated when the user starts to submit input.
Consider a text input field for entering phone numbers created using the following code:
<input aria-required="true" maxlength="20" class="form-control form-input " type="text" name="plejeforaeldre[0].telefonnummer" value="" id="plejeforaeldre[0].telefonnummer" data-input-regex="^(\+|\d)[0-9]*$">
This only allows for entering the '+' if the field is empty. It is not possible to first write a set of numbers and then later add the '+'