-
Hello, I am using the mask plugin to format IBAN numbers. It seems like the mask only lets me enter a specific number of chars not respecting the pattern I supplied. Take the following code. I would expect that it would let me enter Is this a bug or do i have a misunderstanding about the functionality of the mask plugin? Thanks in advance <html>
<head>
<script
defer
src="https://cdn.jsdelivr.net/npm/@alpinejs/mask@3.x.x/dist/cdn.min.js"
></script>
<script
defer
src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"
></script>
</head>
<body>
<div x-data="{iban: 'UA903052992990004149123456789'}">
<p>
UA90 3052 9929 9000 4149 1234 5678 9
</p>
<input
style="width: 400px"
type="text"
name="IBAN"
id="IBAN"
maxlength="34"
class="form-control"
x-model="iban"
x-mask="aa99 9999 9999 9999 9999 9999 9999 9999"
required
/>
</div>
</body>
</html> |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Your max length is 34, but your pattern and input are 39 |
Beta Was this translation helpful? Give feedback.
Your max length is 34, but your pattern and input are 39