Let's say I have a watch function that monitors a model in this way...
$scope.$watch('number', function () { $scope.number = $scope.number.replace(/\D/, ''); $scope.number = $scope.number.replace(/\s+/g, ''); $scope.number = $scope.number .replace(/[\W]/g, ''); });
This feature prevents users from inputting special characters and letters into the text box.
Now, I also have another text box using a different model called ng-model="faxNumber"
Would it be possible to include this model name in the same watch function or should I create a separate one?
Thank you for your help!