Tôi đang cố xác thực các trường số điện thoại. Điều kiện là các trường được xác thực khi người dùng nhập trường tên vị trí tiếp theo. fiddle Các trường số điện thoại cũng cần tab tự động vào trường nhập điện thoại tiếp theo. [khi nhập mã vùng (3 chữ số), tiêu điểm sẽ chuyển sang trường nhập số điện thoại 3 chữ số tiếp theo). khi thực hiện tập trung vào 4 chữ số cuối cùng.AngularJS - Ba xác nhận số điện thoại của trường đầu vào
<form id="aidLocationForm" class="well form-inline">
<div class="control-group phone-group">
<label for="phone1" class="col-xs-12 col-sm-4 col-md-4 col-lg-4 col-xl-4 control-label">Primary contact number</label>
<div class="controls">
<input type="text" value="" maxlength="3" ng-minlength="3" ng-maxlength="3" class="area-code input-mini aid-primary-phone1-lbl" aria-label="Primary contact number" pattern="/^[0-9]{3}$">
<input type="text" value="" maxlength="3" ng-minlength="3" ng-maxlength="3" class="area-code input-mini aid-primary-phone2-lbl" aria-label="Primary contact number" pattern="/^[0-9]{3}$">
<input type="text" value="" maxlength="4" ng-minlength="4" ng-maxlength="4" class="area-code input-mini aid-primary-phone3-lbl" aria-label="Primary contact number" pattern="/^[0-9]{4}$">
</div>
</div>
<div class="control-group">
<label for="primaryLocationName" class="col-xs-12 col-sm-4 col-md-4 col-lg-4 col-xl-4 control-label aid-primary-location-location-lbl">Primary Location Name</label>
<!-- end of label -->
<div class="controls">
<input type="text" name="primaryLocationName" id="primaryLocationName" class="col-xs-12 col-sm-9 col-md-6 col-lg-6 col-xl-6 aid-primary-location-name-input" ng-model="" required placeholder="Enter the city followed by location" size="50" maxlength="50"
aria-disabled="true" aria-label="Primary Location Name">
</div>
</div>
<button type="submit" class="btn">Sign in</button>
</form>
fiddle của bạn không phải là chức năng. Vui lòng đăng phiên bản đang hoạt động. – Phix
Bạn thậm chí có kiểm tra bảng điều khiển trước khi đăng không? Nó không hoạt động! – Phix
@Phix - My bad .. Tôi đã thêm các xác thực cơ bản để kiểm tra độ dài và thêm jquery.jsfiddle.net/priyaa2002/mvsyde1o/ – dragonfly