model.$formatters.unshift(function (modelValue) { setValidity(validateName(modelValue)); return modelValue; });