ChrisASearles / CompLinks

0 stars 0 forks source link

Force 10 digits for a phone number in Account/MyProfile #170

Closed robgpeak closed 7 years ago

robgpeak commented 7 years ago

If a user attempts to put in a phone number that is not a full 10 digits, and clicks update info, it responds with "Profile Has Been Updated" and reverts the phone number back to 555-555-5555. I would suppose it should return a yellow error saying this phone number field must be 10 digits. Similar to what happens when the email address is not entered in the proper format

On a side note, nice job with the () - formatting when someone starts typing.

cgladue commented 7 years ago

image

it limits the input to 10 characters now but it lets people enter non-numeric values.

robgpeak commented 7 years ago

I must have missed something. Why does it not automatically format to () -_____ anymore? And why would we allow non-numeric values? Only Audrey Hepburn still uses KL5-6312 as a phone number any more...

cgladue commented 7 years ago

it dosnt format with the () because chris said i cant use jQuery, which is what i used to do the formatting. So i removed it.

and some us arent old enough to even know who audrey hepburne is rob ;)

robgpeak commented 7 years ago

Well with whatever it is that you're using, you can't force it to only allow numbers? Seem archaic.

And I call bullshit on anyone not knowing who Audrey Hepburn is... At least not anyone reading this thread... lol

cgladue commented 7 years ago

haha... im sure chris and derek could, i have never used Angular (what they are using instead of jQuery) so its out of my hands ...

i know who she is but thats about it, i dont know what they reference was to, and i dont even really know what shes famous for so, yea...

robgpeak commented 7 years ago

The reference was just supposed to mean, you know how in old movies that would always quote a phone number as KL5... The Honeymooners too. Unless you're too young for that :)

cgladue commented 7 years ago

lol my life pretty much starts with i love lucy, get smart, and dick van dike.

Dwells7583 commented 7 years ago

The phone will accept only numbers, sorry Audrey. The formatting will be done also, but I pushed up the fix to the numbers only for now.

robgpeak commented 7 years ago

LOL

robgpeak commented 7 years ago

I just did a cache clear, and was able to enter letters into the phone field...

screen shot 2017-06-09 at 8 40 25 am
Dwells7583 commented 7 years ago

It hasn't been published yet.

robgpeak commented 7 years ago

Oh, OK. Off to the gym then. back in a bit.

cgladue commented 7 years ago

enjoy the gun show...

ChrisASearles commented 7 years ago

This has been "materialized" and "angularized" and should be good.

ChrisASearles commented 7 years ago

Spoke too soon.

ChrisASearles commented 7 years ago

Ok, was missing ticks, should be all good.

ChrisASearles commented 7 years ago

Damnit ...

ChrisASearles commented 7 years ago

Committed.

cgladue commented 7 years ago

@robgpeak Published

robgpeak commented 7 years ago

If there are less than 10 digits entered into the field, and someone clicks "Update Info", there is a green check mark saying the profile has been updated, but the phone number field still remains empty. There should be an error message saying there must be 10 digits.

ChrisASearles commented 7 years ago

Committed. This field will now disable the save button and show an error message if there's something in it that's invalid, otherwise it re-enables with valid content or if it remains empty.