Module: Negroni::Models::Validatable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/negroni/models/validatable.rb
Overview
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.
## Options
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. Default: 8..72
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
-
.required_fields(_klass = nil) ⇒ Object
Required fields for :validatable.
Class Method Details
.required_fields(_klass = nil) ⇒ Object
Required fields for :validatable
21 22 23 |
# File 'lib/negroni/models/validatable.rb', line 21 def self.required_fields(_klass = nil) [] end |