I'm trying override the :message validates_presence_of email and password, but I can not. How to I solve this?
The source code shows another route: you can override some methods to determine whether they are needed:
def password_required?
!persisted? || !password.nil? || !password_confirmation.nil?
end
def email_required?
true
end
Put those functions in your user model, and change them as needed.
I describe here how to customize your devise validations: http://jessewolgamott.com/blog/2011/12/08/the-one-where-devise-validations-are-customized/
You'll remove :validatable and replace/customize the rest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With