       (@state.value or '').search(new RegExp(@props.params.regex)) >= 0
 
     validationRequired: ->
-      !!@props.params.regex
+      !!@props.params.regex or !!@props.params.pattern
 
     buildVisualAndHiddenValues: (extractValueRegexp, valueParts, pattern, nextVal) ->
       value = @substitute(valueParts, @getSubstitutions(extractValueRegexp, nextVal))

          @setValidationState()

    onKeyDown: (event) ->
      if event.keyCode == 8 or event.keyCode == 46
        event.preventDefault()

        @updateValue(event.target, true)
      else
        @updateValue(event.target, false)

      @runValidation()

    onBlur: (_) ->
      @controlValidationTooltip(true)


    onChange: (event) ->
      @updateValue(event.target, false)

      if @validationRequired()
        @runValidation()

    runValidation: ->
      unless @state.valid
