We create two directives for custom validation. 1.integer
. We use here the type="number" with min="0" and max="10". But the . and , are not allowed! 2.smart-float
We want that the numbers with comma are valid. Therefore we can't use the html5 number type for it. the html5-browsers would not allow user to type what it would consider an invalid number, such as1,2