Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

number validation in typescript

  <input type="text" pattern="d*" maxlength="10" onkeydown="javascript: return event.keyCode === 9 || event.keyCode === 8 || event.keyCode === 46 ? true : !isNaN(Number(event.key))" class="form-control form-control-solid form-control-lg"
                                                [ngModelOptions]="{standalone: true}" [disabled]="!onOff"
                                                [(ngModel)]="communityModel.associationContactNo" />
 
PREVIOUS NEXT
Tagged: #number #validation #typescript
ADD COMMENT
Topic
Name
5+5 =