mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-02 06:11:32 +01:00
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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user