Closed JelenaD1 closed 2 years ago
@garettarrowood We added a simple validation for presence and for a length. Before we update the specs we wanted clarification on the phone number format. Right now we don't allow any space between the digits or any -
. Is that fine or do we want different format?
Our main
branch has gotten a little out of whack.
If you'd like to continue to work on this, please cherry-pick these two commits and open up a fresh PR. Sorry for the inconvenience!
In regards to your question, I believe one solution may be to strip all -
, (
, )
, ` and
.` out of the input, then validate the length of 10 numeric characters.
cc/ @RudeChowder
Resolves #192
Description
This PR is adding validation on
phone_number
. Number can not be blank and must be 10 digits long. Before we move on and add specs we need clarification on the phone number format. Format we added does not allow any space or-
between the digits. Once we clarify that is a format we want we will go ahead and add specs for student and user model as well.Type of change
Screenshots