.
Why not just type your phone number
well that's one way to make sure they enter digits. Not a good way. Not a correct way. But a way.
>>54500440
B-but they told me input validation is hard.
>>54500397
wtf man... i know its a general rule that programmers are bad at ux, but for fuck sake...
>input
>when losing focus validate text entered
>if it has a leading + exchange it with 00
>var validInput = (new RegExp('^\\d+$')).test("input");
>if (!validInput) input.class += " wrong-input";
how hard is that?
i have a hexadecimal phone number wtf do i do
>>54500627
you kill yourself
>>54500465
and yet you can easy enter arbitrary strings into that with the chrome inspector.