Skip to content
This repository was archived by the owner on Oct 9, 2021. It is now read-only.

Accept non-US phone numbers #45

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions S3WebApp/S3/modules/signup/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ <h3>Sign Up</h3>
</div>
<div class="form-group " ng-class="{ 'has-error': signupForm.phone.$touched && signupForm.phone.$invalid }">
<div class="col-xs-12">
<input name="phone" class="form-control" ng-model="user.phone" required placeholder="Mobile Phone" type="text" ng-pattern="/^[1-9][0-9]{9}$/">
<input name="phone" class="form-control" ng-model="user.phone" required placeholder="Mobile Phone" type="text" ng-pattern="/^\+[1-9][0-9]{8,15}$/">
<div class="help-block" ng-messages="signupForm.phone.$error" ng-if="signupForm.phone.$touched">
<p ng-message="required">This field is required</p>
<p ng-message="pattern">Digits only please. Must be a valid 10 digit phone number</p>
<p ng-message="pattern">Digits only please. Must start with + and the country code, must be between 9 and 16 digits</p>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion S3WebApp/S3/modules/signup/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ angular.module('chatApp.signup', ['chatApp.utils'])
};
var dataPhoneNumber = {
Name : 'phone_number',
Value : '+1' + $scope.user.phone
Value : $scope.user.phone
};
var dataName = {
Name : 'name',
Expand Down