Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to mark part of pattern as constant #1099

Open
romero83 opened this issue Dec 5, 2024 · 0 comments
Open

How to mark part of pattern as constant #1099

romero83 opened this issue Dec 5, 2024 · 0 comments

Comments

@romero83
Copy link

romero83 commented Dec 5, 2024

Hi!

Sorry, I think it will be a lame question, but how can I mark part of pattern as constant?
Consider the following example:

<!DOCTYPE html>
<html>
<head>
	<script src="https://unpkg.com/imask"></script>
</head>
<body>

<form>
 <input type="text" id="inputField" value="3455435345">
</form>

<script>
var masked = IMask(
  document.getElementById('inputField'),
  {
    mask: '+{345}(000)000-00-00', // expected: +345(345)543-53-45 | actual: +345(543)534-5
	lazy: false
  }
);
</script>
</body>
</html> 

When page loading the input field filled with value "+345(543)534-5" , but I expect "+345(345)543-53-45".
How can I achieve this?
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant