Hi i have a question about validate My country Identity Number (Malaysia)(12digit). My country first 6 digit number represent as date of birth, for example 880115 (YYMMDD) 1988-01-15 In angular, i need some advice for how to i catch first 6digit of ID then validate as date and if Under 19years old Will Cancel the registration.
"Here is my official requirement, Validate with first 6 digit of IC. If Age below 19, prompt message and reject the registration."
<label>Identity No: </label>
<input type = "text" name="Identity_No" id="Identity_No" ngModel #IdentityNo="ngModel" maxlength="12" minlength="12" required >
<div *ngIf="IdentityNo.touched" class="alert alert-danger">
<div *ngIf="IdentityNo.errors?.required">
Identity No is required
</div>
<div *ngIf="IdentityNo.errors?.minlength">
must be 12 valid characters long.
</div>
</div>