0

How I can add multiple alphanumeric characters. In regular expression we use [a-zA-z0-9 ]+, + signifies you can add atleast one alphanumeric. So, how I can achieve this through mask i.e. adding multiple alphanumeric characters.

I have tried the following:

jQuery('.alphanumeric-field').mask('A')

MaartenDev
  • 5,093
  • 5
  • 20
  • 31

1 Answers1

0
$('.Address, .APT').mask('Z', {
    translation: {
      'Z': { pattern: "^[a-zA-Z0-9_ ]*$", optional: true, recursive: true}
    },
    maxlength: false
  });
  • 1
    Code dumps without any explanation are rarely helpful. Stack Overflow is about learning, not providing snippets to blindly copy and paste. Please [edit] your question and explain how it works better than what the OP provided. – Chris May 17 '20 at 12:14