title: Validation to contain a certain string Rails
body: <p>I have a parameter in one of my models called "facebook_url". How can I be sure the user input contains "facebook.com" and isn't some random website?</p>
  
  <p>Right now I have: </p>
  
  <pre><code>unless self.facebook_url[/\Afacebook.com\/\//]
    self.facebook_url = "" unless self.facebook_url == ""
  end
  </code></pre>
  
  <p>But this isn't really working how I want it.</p>