Skip to content

Instantly share code, notes, and snippets.

@nioufe
Created January 27, 2016 16:33
Show Gist options
  • Save nioufe/a0d945c761784a7d9fe5 to your computer and use it in GitHub Desktop.
Save nioufe/a0d945c761784a7d9fe5 to your computer and use it in GitHub Desktop.
ngModelCtrl.$validators = {
regex : (modelValue, viewValue) => {
if(valid) return true;
return false;
},
anyOtherValidation : ...
}
ngModelCtrl.$validators.yetAnotehrValidation = ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment