I have a requirement in Singapore to validate contact numbers entered by users. The number must start with 6, 8, or 9 and should have a total of 8 digits. I am currently utilizing ng-pattern on an input field with a regex solution, but I am concerned about violating the Separation of Concerns (SoC) principle as the logic is within the view.
<input ng-model='user.number' ng-pattern='/[689]\d{7}/' />