Module: SimpleFormWithClientValidation::Components::Pattern

Included in:
Inputs::Base
Defined in:
lib/simple_form_with_client_validation/components/pattern.rb

Overview

Needs to be enabled in order to do automatic lookups.

Instance Method Summary collapse

Instance Method Details

#patternObject



7
8
9
10
11
12
# File 'lib/simple_form_with_client_validation/components/pattern.rb', line 7

def pattern
  input_html_options[:pattern] ||= pattern_source
  input_html_options[:'data-pattern'] = input_html_options[:pattern]
  input_html_options[:'data-pattern-message'] = options[:'data-pattern-message'] || pattern_error_message
  nil
end