RubyFlow The Ruby and Rails community linklog

Build your own Ruby on Rails validations and use them like the default ones

Sometimes built in validations are not enough so we have to write our own validation rules. Because of this, our models can become fat really quick so the best idea to avoid it is to extract validation logic to separated classes. Such approach makes the code more clean, isolated and reusable - http://pdabrowski.com/blog/ruby-on-rails/validations/building-custom-validator/

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in