jaridmargolin / formatter.js

Format html inputs to match a specified pattern
http://firstopinion.github.io/formatter.js
2.48k stars 235 forks source link

Allow user to completely empty a field when persistent is false #18

Closed gboudreau closed 10 years ago

gboudreau commented 10 years ago

When using persistent=false, and using a pattern that starts with a formatted characters, for example ({{999}}), the user is not able to completely empty the field; there will always be a character left in there. This makes it complicated to validate posted values, as we would need to treat "(" the same as an empty field. This change will allow the user to remove this last character.

jaridmargolin commented 10 years ago

I agree that this is not the desired output, however, I believe this is the result of a larger issue regarding undesired formatted chars being added when deleting chars with the opt persistent=false. Thank you. This will be resolved in the next push.