inputmask-core icon indicating copy to clipboard operation
inputmask-core copied to clipboard

Question: Any reason why blank placeholderChar not supported?

Open mdgbayly opened this issue 8 years ago • 1 comments

I was trying to use the react-maskedinput library to handle entering percentages with a mask like: '111%'. Ideally I'd like to not have any placeholderChar because 9% and 99% would both be valid values too.

I tried setting the DEFAULT_PLACEHOLDER_CHAR = '' and commenting out the validation error in InputMask.

Seems to work ok for my pattern but wondering if this will likely cause issues for other patterns?

mdgbayly avatar Mar 08 '16 03:03 mdgbayly

@mdgbayly, with regards to your comment:

Seems to work ok for my pattern but wondering if this will likely cause issues for other patterns?

My opinion is that it is up to the consumer to set a placeholderChar that looks good with their pattern, it is not up to the library to restrict placeholderChars on the off-chance that it may not look good.

NickGard avatar Sep 08 '16 19:09 NickGard