RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.4k stars 2.17k forks source link

Min/Max Numeric Extension Events #1863

Open Myrdivar opened 6 years ago

Myrdivar commented 6 years ago

Hi,

Is there an event that fires when the user input a value that exceeds the specified range and the inputmask corrects and set it to the min or max value?

Thanks!

RobinHerbots commented 6 years ago

No there isn't.

scottkidder commented 6 years ago

Is there any possible way to achieve something like using some of the granular validation steps?

scottkidder commented 6 years ago

I ended up solving this by not passing min/max in options (so I always get events) and then doing my own min/max check and setting the result back into the inputmask using Inputmask.setValue(sel, validatedNumber);

This works well enough and stays with following Ember DDAU (data down actions up).