首先条件:/^([a-zA-Z]{5})(\d{4})([a-zA-Z]{1})$/; 条件二:(/^([a-zA-Z]){4}([0-9]){5}([a-zA-Z]){1}?$/g)
html
<input type="text" ng-model="userDetail.id" name="uid" required="" ng-pattern="regx" />
Angular
scope.regx= Condition first or condition Second
scope.regx=/^([a-zA-Z]{5})(\d{4})([a-zA-Z]{1})$/ || /^([a-zA-Z]){4}([0-9]){5}([a-zA-Z]){1}?$/g; not working
最佳答案
关于javascript - 如何在输入框中应用多个 ng-pattern 或条件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38587499/