Skip to content

replacement character can't be used in value #55

@ronderksen

Description

@ronderksen

I have a field that takes an IBAN bank account number. These consist of 2 letters, 2 digits, 4 letters and 10 digits. I have react-input set up as follows:

const replacement = { _: /\d/, X: /[A-Z]/ };
const mask =  "XX __ XXXX ____ ____ __";

However, if I now want to type the letter X, the input is blocked, even though the replacement regex would allow it.

Is this a bug or am I using the library wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions