Problems with length validation fixed

I have changed the creation of the validatorMessages list. The validator
key is not anymore the validation type but the keyword used by AngularJS
HasError detection expanded with ngModel.$pristine