inputmask-core
inputmask-core copied to clipboard
Question: Any reason why blank placeholderChar not supported?
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, 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 placeholderChar
s on the off-chance that it may not look good.