Questions tagged [input-mask]

A string expression, defined by a developer, that governs what a user is allowed to enter in as input in a text box.

An input mask is in general a set of rules, that entered data must conform to, mainly used for the purposes of data integrity by preventing transcription errors. The syntax of this string expression differs from implementation to implementation, but the fundamental input types are all supported.

Some frequent uses of input masks include entry of telephone numbers, ZIP or postal codes, times and dates.

229 questions
6
votes
3 answers

jQuery input mask for phone number

I want a user's input to autofill the punctuation of a phone number in order to look like this (xxx) xxx-xxxx. This is my HTML code:
5
votes
1 answer

p-inputMask ng-model not clearing for invalid value

I am using inputMask field from PrimeNG {{attr.attributeValue}} But if I enter a in the textbox and focus out, that textbox is clearing…
Thomas
  • 213
  • 5
  • 17
5
votes
3 answers

inputmask must allow unlimited digits

So below is my snippet, currently inputmask allow only this format "_." (e.g 5.55). Is there a way I could extend the format like I want this format "._____________.." (e.g 55.555555555555555555555... where after 55. the rest of the input digits…
Juliver Galleto
  • 8,831
  • 27
  • 86
  • 164
5
votes
1 answer

Input mask for phone form field in rails view

I have a customer contact form in my app which, of course, requires a phone input. I am running Rails 3.2.13 and using Zurb Foundation. I am hoping to find a gem that offers an input mask in the form '(999) 999-9999' that I can call. My data is…
ctgScott
  • 231
  • 3
  • 6
  • 18
4
votes
1 answer

Application crash when delete digits (redmarobot input mask)

I am using redmadrobot:inputmask to use card number input mask. Input mask is working properly, but when I try to delete digits from my input, the application crashes. Here is my code. ArrayList affineFormats = new ArrayList<>(); …
Android
  • 239
  • 1
  • 4
  • 12
4
votes
3 answers

Jquery Input Mask (Redefine numeric "9")

I'm using RobinHerbots jquery input mask. How to redefine the "9", so the mask will show XXXX91 instead of XXXXX1? EDIT: if possible I would like to make last two digits uneditable var autoPopulateNo = 91 //how to show the mask like this…
Rick
  • 541
  • 1
  • 8
  • 22
4
votes
1 answer

Regex for feet and inches - with decimals and fractions

I'm creating an input mask used to for the length of items. This input will convert to a "proper" format on blur but it should accept numbers, decimals, spaces, single quotes, double quotes and / for fractions (no letters). I've got an okay start,…
triplethreat77
  • 1,276
  • 8
  • 34
  • 69
4
votes
3 answers

Escape Number 9 in p:inputmask

I want to prepend +90 (Turkey's phone code) to every phone numbers a user enters. For that reason I am using a mask like this:
Ahmet
  • 908
  • 1
  • 17
  • 26
3
votes
0 answers

How to input less than 1$ using mouse in alias: "currency" with decimals , Inputmask

I`m using RobinHerbots input-mask: https://github.com/RobinHerbots/Inputmask You can refer to the currency demo according to this page: http://robinherbots.github.io/Inputmask/ and click the demo tab, then currency. Now to input less then $1 user…
3
votes
0 answers

React-hook-form Uncontrolled error when using input mask with material UI textfield

when I'm using a controller with input mask and a text field of the material I can't access the errors at the time of submit. I already tried to put a default value that they suggested in some similar questions but it didn't work. Below I left some…
Bruno
  • 31
  • 3
3
votes
2 answers

Angular 10 thousand separator

In my Angular 10 project, I have some mat-form-fields with that I want to add a thousand separator to. Meaning, as the user is entering a number, the program should insert commas every three digits and not in the floating part…
Newsha Nik
  • 806
  • 2
  • 12
  • 29
3
votes
0 answers

Problem in Angular with a mask and validator on an input

I have a problem by using a mask and a regex on an input. This is the input: HH:mm:ss:SSS
user3659739
  • 434
  • 6
  • 19
3
votes
2 answers

It is possible to use reactstrap with react-hook-form and react-input-mask?

I've been trying for a while but without any success. I've managed to implement reactstrap + react-hook-form and reactstrap + react-input-mask but not the three of then together. Here's the code running:…
Gabriel Brito
  • 1,003
  • 2
  • 16
  • 26
3
votes
0 answers

Inputmask oncomplete without JQuery

I set mask: and call inputmask for multiple elements: let els = document.querySelectorAll("input"); Inputmask().mask(els); How I can set oncomplete event after? I try like…
3
votes
1 answer

date of birth input mask react

I am using this react input mask. The input mask is being used for a user's date of birth. This works, however, the issue I am having is that a user can enter 54/54/2017 into the input box. I want to prevent this. One way I can do this is by…
user7597670
1
2
3
15 16