I have an input field like this:
HTML
You can add the following attribute to your input field.
ng-pattern="/^[0-5]+$/"
And validate as such:
function formCtrl($scope) { }
The number must be between 0-5 No characters allowed The field is required