I try to add an email-validator in my rails app. I created the following file /lib/validators/email_validator.rb
/lib/validators/email_validator.rb
class EmailValidator < Activ
This error occures, because rails loads model file before your validation file
Try to require your validation file manually at the start of your model file
require_dependency 'validators/email_validator.rb'