Add the validation here and update your spec.  Test out your regex in Rubular.  Check out the Rails Guides for the proper format validation syntax: http://edgeguides.rubyonrails.org/active_record_validations.html#format