Rails Custom Validations

Опубликовано: 18 Март 2026
на канале: BrainTrust Digital
4,145
74

In this tutorial we cover how to add basic and custom validations in Ruby on Rails. Rails validations are a way to ensure precise constraints around your data. Validations are a great way to provide feedback to your users via your form data as a result of the tooling which automatically populates errors with clear messages. Rails give you the access to several built in validation helpers to use to refine this data, or you can create completely custom validations to fit you needs.

⏰ Timestamps
0:00 Introduction
0:25 THANK YOU for 1K!
0:56 What are validations
1:57 A few examples
2:47 Validate videos
4:21 View in browser
5:32 Rails reference
5:57 Custom validations
8:08 Regular expressions
9:14 Use custom validator
9:34 Verify in browser
10:10 Closing notes

Reference links
https://edgeguides.rubyonrails.org/ac...
https://rubular.com

AWS + Rails Series Playlist
   • AWS + Rails  

My Gear List
http://brain-trust.io/my-gear

My YouTube SEO Software
https://www.tubebuddy.com/braintrust

My Accounting Software
https://shareasale.com/r.cfm?b=960179...

Try Audible and Get Two Free Audiobooks
https://amzn.to/36dXe3V

Make sure you subscribe to my channel to keep up to date with new content!

DISCLAIMER: Links in this description include affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you! Thank you for supporting BrainTrust Digital so I can continue to provide you with free content each week!