Closed ulternate closed 8 years ago
@ulternate what if the phone number is inputted as +61 012 345 678?
For the time being I'm only making sure you're not going to break the database when you try and save. So I'm only checking for a number.
We'd be better off using a gem for this as there's a bunch of things to test for and we might want to support area codes on landlines as well (I.e. (08) 9400 1234).
For the time being it will notify the user that they need to enter their number as 0412345678 or 94001234
Feel free to add more checking, but I'd say it's not important.
Feel free to display it however you like though. It'll be a nice and dependable value for any js you need to write
Ok this is fine esp. for V1
^ Simon, i don't know how the last one affects prod. I did it using rake db:schema:dump rather than making a migration. Sorry if that stuffs things up for you. I'm hoping it's not an issue as you'll override the schema file on the prod server when you pull from master there.
Cheers,
Daniel