Change regexp anchors to fix security risk error thrown by activemodel

I ran into this error when trying to load the environment:
activemodel-4.0.2/lib/active_model/validations/format.rb:46:in `check_options_validity': The provided regular expression is using multiline anchors (^ or $), which may present a security risk. Did you mean to use \A and \z, or forgot to add the :multiline => true option? (ArgumentError)