IonicProgramming

Validate Domain Ionic 3 or 2 | Learn Form Validation in Ionic Part 1

Validate Domain Ionic 3 or 2 | Learn Form Validation in Ionic Part 1

validate domain ionic

validate domain ionic

this.domainForm = FormGroup;
  this.domainForm = fb.group 
  ({
    'domain':[null, Validators.compose([Validators.required, Validators.pattern(/\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b/)])]
  })

<ion-header>
  <ion-navbar>
    <ion-title>
      Ionic Blank
    </ion-title>
  </ion-navbar>
</ion-header>

<ion-content padding>
  <form [formGroup]="domainForm">
    <ion-item>
      <ion-input type="text" name="domain" placeholder="start typing" [formControl]="domainForm.controls['domain']">
      </ion-input>
    </ion-item>
    <button ion-button full block [disabled]="!domainForm.valid">Search Domain</button>
  </form>
</ion-content>

 

Need help to understand more?

Watch the video:

Thanks for reading.

Latest post: Learn to download asset bundle from server in unity

Created a mobile app for domain research. Its V0.1 for now so expect a simple and basic design.

I am open for your comments and suggestions on how can I improve the app.

iOS: https://goo.gl/5kzWFn

Android: https://goo.gl/3H3Zfj

#android #iosdevelopment #ionicframework #domainregistration #domainnames #hobbies