Module | Devise::Models::Validatable |
In: |
lib/devise/models/validatable.rb
|
Validatable creates all needed validations for a user email and password. It‘s optional, given you may want to create the validations by yourself. Automatically validate if the email is present, unique and its format is valid. Also tests presence of password, confirmation and length.
Validatable adds the following options to devise_for:
* +email_regexp+: the regular expression used to validate e-mails; * +password_length+: a range expressing password length. Defaults to 6..128.
VALIDATIONS | = | [ :validates_presence_of, :validates_uniqueness_of, :validates_format_of, :validates_confirmation_of, :validates_length_of ].freeze | All validations used by this module. |