jaridmargolin / formatter.js

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

How to create a formatted field prices? #93

Open voskobovich opened 8 years ago

voskobovich commented 8 years ago

I have a field to enter the price. Allowed to enter the price fits the regular expression.

^\d{1,10}(\.\d{2})?$

that is, the whole of the ten digits and exactly 2 characters in the fractional part, if the fractional part is required.

How to implement the formatting of your plugin?