Class: JqueryValidator::FormatValidator

Inherits:
Base
  • Object
show all
Defined in:
lib/jquery_validator/base.rb

Instance Method Summary collapse

Methods inherited from Base

#attributes, #initialize

Constructor Details

This class inherits a constructor from JqueryValidator::Base

Instance Method Details

#validate_argumentsObject



83
84
85
86
87
88
89
# File 'lib/jquery_validator/base.rb', line 83

def validate_arguments
  field = "#{@builder.object_name}[#{@validator.attributes.first}]"
  args = {:rules => {field => {}}}
  args[:rules][field][:matches] = @validator.options[:with].source if @validator.options[:with]
  args[:rules][field][:nomatches] = @validator.options[:without].source if @validator.options[:without]
  args
end