Fix validator on token to use \A \z instead of $ and ^ in regex; deprecated use of :conditions for Rails 4