       blurred = false
       options = scope.$eval attrs.showErrors
       showSuccess = getShowSuccess options
+      trigger = getTrigger options
 
       inputEl   = el[0].querySelector("[name]")
       inputNgEl = angular.element(inputEl)


showErrorsModule.provider 'showErrorsConfig', ->
  _showSuccess = false

  @showSuccess = (showSuccess) ->
    _showSuccess = showSuccess

  @$get = ->
    showSuccess: _showSuccess

  return


showErrorsModule.directive 'showErrors',
['$timeout', 'showErrorsConfig', ($timeout, showErrorsConfig) ->
    
    getTrigger = (options) ->
      trigger = showErrorsConfig.trigger
      if options && options.trigger?
        trigger = options.trigger
      trigger
    
    getShowSuccess = (options) ->
      showSuccess = showErrorsConfig.showSuccess
      if options && options.showSuccess?
