Created
April 30, 2018 00:33
-
-
Save djabif/f03b66c40c2e1779201eb1b1067b8045 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form [formGroup]="userDetailsForm" (ngSubmit)="onSubmitUserDetails(userDetailsForm.value)"> | |
<mat-form-field class="full-width"> | |
<input matInput placeholder="Full Name" formControlName="fullname" required> | |
<mat-error *ngFor="let validation of validation_messages.fullname"> | |
<mat-error class="error-message" *ngIf="userDetailsForm.get('fullname').hasError(validation.type) && (userDetailsForm.get('fullname').dirty || userDetailsForm.get('fullname').touched)">{{validation.message}}</mat-error> | |
</mat-error> | |
</mat-form-field> | |
<button class="submit-btn" color="primary" mat-raised-button type="submit" [disabled]="!userDetailsForm.valid">Submit</button> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment