Fix new message number validation
This commit is contained in:
parent
838283f28b
commit
78166365c7
1 changed files with 2 additions and 2 deletions
|
@ -25,6 +25,7 @@ var Whisper = Whisper || {};
|
||||||
var number = libphonenumber.util.verifyNumber(val, myRegionCode);
|
var number = libphonenumber.util.verifyNumber(val, myRegionCode);
|
||||||
}
|
}
|
||||||
this.removeError();
|
this.removeError();
|
||||||
|
return number;
|
||||||
} catch(ex) {
|
} catch(ex) {
|
||||||
this.$el.addClass('error');
|
this.$el.addClass('error');
|
||||||
console.log(ex);
|
console.log(ex);
|
||||||
|
@ -38,8 +39,7 @@ var Whisper = Whisper || {};
|
||||||
this.template = $('#new-message-form').html();
|
this.template = $('#new-message-form').html();
|
||||||
Mustache.parse(this.template);
|
Mustache.parse(this.template);
|
||||||
this.render();
|
this.render();
|
||||||
this.input = this.$el.find('input.number');
|
this.input = new MessageRecipientInputView({el: this.$el.find('input.number')});
|
||||||
new MessageRecipientInputView({el: this.input});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
|
|
Loading…
Reference in a new issue