angular-input-masks icon indicating copy to clipboard operation
angular-input-masks copied to clipboard

Max attribute doesn't work

Open MMrR0b0TT opened this issue 9 years ago • 12 comments

I setted max="100" but I could type something greater than.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/26905201-max-attribute-doesn-t-work?utm_campaign=plugin&utm_content=tracker%2F1022469&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1022469&utm_medium=issues&utm_source=github).

MMrR0b0TT avatar Sep 23 '15 19:09 MMrR0b0TT

In which input-mask? Number?

assisrafael avatar Nov 04 '15 09:11 assisrafael

right here:

<input type="text" ng-model="vm.model.Percentual" class="form-control input-sm" ui-number-mask max="100">

MMrR0b0TT avatar Nov 04 '15 16:11 MMrR0b0TT

There is a unit test that checks this feature, take a look: https://github.com/assisrafael/angular-input-masks/blob/master/src/global/number/number.test.js#L66

Can you build a demo (like plunker) that shows your problem?

assisrafael avatar Nov 06 '15 06:11 assisrafael

I have the same issue :(

<input type="text" class="form-control input-sm" ng-model="vm.review.value" ui-number-mask min="0" max="10"> captura de tela 2015-11-27 as 18 22 43

devindex avatar Nov 27 '15 20:11 devindex

+1

devfelipereis avatar Feb 29 '16 17:02 devfelipereis

Same issue. Apparently the input is flagged as invalid, but that doesn't prevent the user from entering a higher number. Could someone confirm what I just said?

Thanks

OlgerCA avatar Sep 14 '16 20:09 OlgerCA

Same issue here, any update on this?

guipsamora avatar Jun 29 '18 05:06 guipsamora

+1

calraiden avatar Feb 28 '19 17:02 calraiden

+1

bruno-machado avatar Mar 06 '19 21:03 bruno-machado

+1

accountgithubgab avatar Aug 07 '19 18:08 accountgithubgab

The following plunker shows that neither min or max attribures are currently working.

http://plnkr.co/edit/NvPGEzr8twSrvoYQuQSv?p=preview

inigoflores avatar Feb 12 '20 19:02 inigoflores

If I'm correct, the implementation doesn't prevent you to type numbers smaller or bigger than min and max. According to the code and unit tests, it will validate if the value respects the thresholds and return true or false.

robsonmwoc avatar Feb 28 '20 02:02 robsonmwoc