react-input-mask icon indicating copy to clipboard operation
react-input-mask copied to clipboard

The example from docs doesn't work

Open Charlie91 opened this issue 4 years ago • 3 comments

Hi.

// Canadian postal code mask
const firstLetter = /(?!.*[DFIOQU])[A-VXY]/i;
const letter = /(?!.*[DFIOQU])[A-Z]/i;
const digit = /[0-9]/;
const mask = [firstLetter, digit, letter, " ", digit, letter, digit];
return <InputMask mask={mask} />;

This example from docs doesn't work for me. Any suggestions?

Here is sandbox https://codesandbox.io/s/elegant-sanderson-99534

Charlie91 avatar Dec 23 '21 12:12 Charlie91

Duplicated, please check: https://github.com/sanniassin/react-input-mask/issues/269

BrianIto avatar Jan 06 '22 16:01 BrianIto

There's a fork of this library working fine, right now and they are reactivating the lib, check: https://github.com/comigotech/react-input-mask

BrianIto avatar Jan 06 '22 17:01 BrianIto

@Charlie91 The reason is probably because your sandbox is using "react-input-mask": "2.0.4", and the example is for v3.0.0-alpha.2.

ianchanning avatar Feb 25 '23 04:02 ianchanning