I have a field in a form that I need to validate with angle. The field must be up to 11 characters long. If you have less than 5 you should get an error message requiring the user to be numbered correctly.
Angle Controller
angular.module('xxx') .controller('yyyController', function ($scope) {
var vm = $scope;
vm.validarCPF = function(){
if( condicao < 11){
//mensagem de erro
}
};
HTML Code
<input type="text" name="cpf" id="cpf" ng-model="cpfusuario">