Relaxes verification code validation
When codes are sent they are formatted as xxx-xxx. Previously when I would paste these from GVoice they failed validation thanks to the dash and whatever whitespace I happened to grab.
This commit is contained in:
parent
27708cd8d7
commit
683c373943
1 changed files with 2 additions and 2 deletions
|
@ -28,8 +28,8 @@ function updateNumberColors() {
|
|||
}
|
||||
|
||||
function isCodeValid() {
|
||||
var code = $('#code');
|
||||
return code.val().replace(/\D/g, '') == code.val() && code.val().length == 6;
|
||||
var verificationCode = $('#code').val().replace(/\D/g, '');
|
||||
return verificationCode.length == 6;
|
||||
}
|
||||
|
||||
$('#code').on('change', function() {
|
||||
|
|
Loading…
Reference in a new issue