Restrict Text Field Input

Is there are any way to limit the characters that can be typed into the number input element? It is not working event the max length option is enabled…

Hi,

You can write code to achieve this:

export function email_keyPress(event) {
 const target = event.target
 if (target.max <= target.value.length) {
    event.target.value = event.target.value.substr(0, 3)
  }
}