I have the current form from the template:
<form #tripForm='ngForm' (ngSubmit)="addTrip(tripForm)" novalidate>
<input type="text" class="form-control" placeholder="" id="new_trpo_name" name="new_trip_name"
[ngModelOptions]="{ updateOn: 'blur' }" new_trip_name
required minlength="3" ngModel #new_trip_name="ngModel">
<div *ngIf="new_trip_name.errors && (new_trip_name.dirty || new_trip_name.touched)">
<div class="error_message" *ngIf="new_trip_name.errors.required">
<span class="e_arrow"></span>
<i>Please enter trip name</i>
</div>
</div>
<div class="error_message" *ngIf="new_trip_name.errors.minlength">
<span class="e_arrow"></span>
<i>Trip name require minimum of {{ new_trip_name.errors.minlength.requiredLength }} characters</i>
</div>
<div class="form-group">
<button class="btn btn-md btn-default trip_submit" [disabled]="!tripForm.valid">Add Trip</button>
</div>
</form>
The validation message show correctly when blur from the field. But the submit button is disabled. If the user enter a valid value in the input and move the mouse to the submit button, he can't press the button. Any idea what should I change/add in order to make it work? thanks.