Performing custom validations in Rails — an example
Too Long; Didn't Read
<a href="https://hackernoon.com/tagged/rails" target="_blank">Rails</a> provides a variety of helpers out of the box for quickly <a href="https://hackernoon.com/tagged/performing" target="_blank">performing</a> commonly used validations — presence, numericality, uniqueness, etc. If the model has validations that go beyond the standard helpers, we must implement a custom validation strategy. I will show three ways of going about validations and discuss pros and cons.