function getValidationMessageMap(originalElement) {
    // Find all the <validator> child elements and extract their (key, message) info
    var validationMessages = {};
    angular.forEach(originalElement.find('validator'), function(element) {
      // Wrap the element in jqLite/jQuery
      element = angular.element(element);
      // Store the message info to be provided to the scope later
      // The content of the validation element may include interpolation {{}}
      // so we will actually store a function created by the $interpolate service
      // To get the interpolated message we will call this function with the scope. e.g.
      //   var messageString = getMessage(scope);
      validationMessages[element.attr('key')] = $interpolate(element.text());
    });
    return validationMessages;
  }
function getValidationMessageMap(originalElement) {
    // Find all the <validator> child elements and extract their (key, message) info
    var validationMessages = {};
    angular.forEach(originalElement.find('validator'), function(element) {
      // Wrap the element in jqLite/jQuery
      element = angular.element(element);
      // Store the message info to be provided to the scope later
      // The content of the validation element may include interpolation {{}}
      // so we will actually store a function created by the $interpolate service
      // To get the interpolated message we will call this function with the scope. e.g.
      //   var messageString = getMessage(scope);
      validationMessages[element.attr('key')] = $interpolate(element.text());
    });
    return validationMessages;
  }
function getValidationMessageMap ( originalElement ) { // Find all the <validator> child elements and extract their (key, message) info var validationMessages = { } ; angular . forEach ( originalElement . find ( 'validator' ) , function ( element ) { // Wrap the element in jqLite/jQuery element = angular . element ( element ) ; // Store the message info to be provided to the scope later // The content of the validation element may include interpolation {{}} // so we will actually store a function created by the $interpolate service // To get the interpolated message we will call this function with the scope. e.g. //   var messageString = getMessage(scope); validationMessages [ element . attr ( 'key' ) ] = $interpolate ( element . text ( ) ) ; } ) ; return validationMessages ; }
Search through the originalDirective's element for elements that contain information about how to map validation keys to messages
Search through the originalDirective s element for elements that contain information about how to map validation keys to messages