diff --git a/src/widgets/phone-edit.jsx b/src/widgets/phone-edit.jsx index 9240205c..7c688ec8 100644 --- a/src/widgets/phone-edit.jsx +++ b/src/widgets/phone-edit.jsx @@ -29,8 +29,10 @@ class PhoneEdit extends React.PureComponent { } handleFinished(e) { + // this.setCustomValidity("Mobile phone number required"); e.preventDefault(); - this.props.onSubmit(this.state.localNumber.trim()); + const number = `${this.state.dialCode}${this.state.localNumber.trim()}`.replace(/[^\d]/g, '') + this.props.onSubmit(`+${number}`); } @@ -62,7 +64,8 @@ class PhoneEdit extends React.PureComponent { +{this.state.dialCode}  + maxLength={17} onKeyDown={this.handleKeyDown} onblur={this.handleFinished} + required autoFocus={this.props.autoFocus} /> ); }