Blazor Mask option

i know that i can work past this but i would like to know if there can be an option to make this simple for the developer:

i work with several large databases that store values like phone number as a string of digits and do not allow any other symbols.
so in the database they store a US phone number as for example 8005551212
no "()-[]., " chars are allowed in the database.

it would be very nice if the user could view and enter a phone number in a common format like:
(800) 555-1212
with a mask like (###) ###-####
but have the bound value that is sent to the database be only the digits and none of the other values.

this happens with some other data. if we have to add code to remove the values we can but we will be doing this many many times over and over.....

so we might use your control as a base and then add this to it.... but i bet there are other places that have the same kind of problem so perhaps a setting like RemoveMaskChars=True might save a lot of work for a lot of users....

Hi @figuerres,

Indeed such mode is not supported however we accept pull requests! Keep in mind that such feature might be tricky since at the moment there is only one HTML input where the user will type and this input will both hold and display the value as well.

I think it is a lot easier to just remove the unwanted data with string.Replace.

i agree that the idea might be difficult to do or need some tricks.... and it might be better to make part of the database side of the logic such as the service that sends the data to the back end data store...
need to think on it and see how messy it is to do...
and some input masks may be simple but some not so much..... and things like phone numbers have different rules in different countries..... in the US we have one standard but i have in the past dealt with international dialing rules.....

will let you know if i come up with any great ideas....