Upgrade activemodel dependency to ~> 4.0

Update activemodel dependency, alter regex in format validation in order to mitigate: 

    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?