Right now, I've got a regular expression that validates a user's facebook link, as such:
facebook_regex = /(http:\/\/)?(https:\/\/)?(www.)?facebook.com\/[a-zA-Z0-9\.]*/i
validates :facebook, :format => { :with => facebook_regex }
The regex itself works just fine, but I'm trying to make the inclusion of a FB link optional, should the user not want theirs posted. However, my validation is kicking up an error if the Facebook field is left blank.
What's the best way to handle this?