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.
pull/749/head
lilia 11 years ago
parent 27708cd8d7
commit 683c373943

@ -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…
Cancel
Save