Method: Authlogic::ActsAsAuthentic::Login::Config#validates_format_of_login_field_options

Defined in:
lib/authlogic/acts_as_authentic/login.rb

#validates_format_of_login_field_options(value = nil) ⇒ Object Also known as: validates_format_of_login_field_options=

A hash of options for the validates_format_of call for the login field. Allows you to change this however you want.

Keep in mind this is ruby. I wanted to keep this as flexible as possible, so you can completely replace the hash or merge options into it. Checkout the convenience function merge_validates_format_of_login_field_options to merge options.

  • Default: => Authlogic::Regex.login, :message => I18n.t(‘error_messages.login_invalid’, :default => “should use only letters, numbers, spaces, and .-_@ please.”)

  • Accepts: Hash of options accepted by validates_format_of



64
65
66
# File 'lib/authlogic/acts_as_authentic/login.rb', line 64

def (value = nil)
  rw_config(:validates_format_of_login_field_options, value, {:with => Authlogic::Regex., :message => I18n.t('error_messages.login_invalid', :default => "should use only letters, numbers, spaces, and .-_@ please.")})
end