ngMinlength and ngMaxlength attribute not bind value, when model value is type Number #5936
Description
cdc4d48#diff-c244afd8def7f268b16ee91a0341c4b2R514
I was reading the commit above, and i have a question...
In the previous code, if the 'value' was type Number, the '.length' property return 'undefined'. So instead of go in the 'if' condition, go in the 'else'.
But in this new condition 'ctrl.$isEmpty(value) || value.length', if the 'value' is a Number, then the condition will return false. Then the validation wont pass. But in the previous condition the same case pass correctly.
My question is: This behavior was intentional? Because i understand if i want a field with a number value i can use input type="number" and then use the 'min' and 'max' attributes. But the layout that i get for this type of input is different in each browser, and some times doesnt fit in the design of the app.
If i am right, i can submit a pull request do help with this, but first i have to be sure that this behavior wasnt intentional.
This example uses Angular 1.2.7 and will success the validation:
http://plnkr.co/edit/YRpqT6Dwc6xbe2LYHEwq
This example uses Angular 1.2.8 and will fail the validation: http://plnkr.co/edit/rZgEtjyDuErDro9K94Q3
The same will apply for 'maxlength' attribute.