Open rostamiani opened 4 years ago
When using Bootstrap invalid fields are green instead of red. The problem is that the "ng-invalid" class is added to the field but ":valid" is still applied. This is the input field:
<input [(ngModel)]="request.count" type="number" class="form-control" name="count" id="count" autocomplete="off" [min]="1" [max]="warehouseRequest.count_request" pattern="^\d+$" required>
And this is the generated DOM:
<input _ngcontent-vyd-c6="" autocomplete="off" class="form-control ng-touched ng-dirty ng-invalid" name="count" pattern="^\d+$" required="" type="number" ng-reflect-required="" ng-reflect-pattern="^\d+$" ng-reflect-max="10" ng-reflect-min="1" ng-reflect-name="count" ng-reflect-model="-5">
And this is the output of checkValidity() function:
And the form itself:
When using Bootstrap invalid fields are green instead of red. The problem is that the "ng-invalid" class is added to the field but ":valid" is still applied. This is the input field:
And this is the generated DOM:
And this is the output of checkValidity() function:
And the form itself: