All threads / Rails for Beginners Part 12: Validations Discussion
Ask A Question

Notifications

You’re not receiving notifications from this thread.

Rails for Beginners Part 12: Validations Discussion

I tried copying this regex "\A[@\s]+@[@\s]+\z" to https://rubular.com/ but it aren't working until I remove the \A and \z making this [@\s]+@[@\s]+ before it could work, any reason for that?

I think you might be doing something wrong. It works in my case, https://rubular.com/r/SrvWLLOAMEq27C

Reply

An alternative to using the Regex can be using a built-in Ruby constant

validates :email, format: { with: URI::MailTo::EMAIL_REGEXP, message: 'invalid email address provided' }

Reply

Not sure if anything can be done about this other than raising the bottom of the terminal window a bit higher, but the Video controls constantly hide what you're doing since you're typing in at the very bottom of the page. The video controls go away after a while of being on the page, but since we're moving to our IDE, they constantly reappear and get in the way. Content is great (a little too fast sometimes, for instance when you set the user = variable but don't mention it), but being able to see the content with the controls is pretty annoying. Nice work though!

Good suggestion, I have the same issue.

yes true! i can't see anything when i wanted to check the commands

Reply
Reply

Ditto what @Jerry said! : )

Reply
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 66,029+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2022 GoRails, LLC. All rights reserved.