Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

angular submit with required

<form (ngSubmit)="onSubmit()" #testForm="ngForm" ngNativeValidate>
  <input type="text" id="test1" name="test1" [(ngModel)]="test" required>
  <input type="text" id="test2" name="test2" [(ngModel)]="test" [required]="true">
  <input type="text" id="test3" name="test3" [(ngModel)]="test" [attr.required]="true">
  <button type="submit">submit</button>
</form>


<-- The important thing here is the "ngNativeValidate" -->
Comment

PREVIOUS NEXT
Code Example
Javascript :: React count up on scroll 
Javascript :: how to get the div value in jquery 
Javascript :: set navigation drawer to open by default react native 
Javascript :: chalk js 
Javascript :: connecting nodejs using mongoose 
Javascript :: change datetime format in js 
Javascript :: react check if localhost 
Javascript :: object json parse javascript 
Javascript :: Find a vowel at the begining and end with regular expression 
Javascript :: timeout httppost angular 
Javascript :: scroll to top js 
Javascript :: how to remove class in all siblings javascript 
Javascript :: javascript select text in element 
Javascript :: javascript capitalize 
Javascript :: flutter intl currency 
Javascript :: passing html vlaues to Javascript function 
Javascript :: window.scrollto(0 0) not working 
Javascript :: add multiple class from array javascript 
Javascript :: mdn rest 
Javascript :: express param in url 
Javascript :: how set default value for react-select 
Javascript :: js regex replace multiple matches 
Javascript :: html close tab 
Javascript :: prettier vscode settings 
Javascript :: install vue js 
Javascript :: random number generator javascript with range 
Javascript :: javascript insert element after 
Javascript :: js add text after div 
Javascript :: nvm check version available to download 
Javascript :: countdown in js 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =