Skip to content

Instantly share code, notes, and snippets.

@theotherdy
Last active July 23, 2018 13:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theotherdy/7cdb1732e07a96d83a429774d49a31ef to your computer and use it in GitHub Desktop.
Save theotherdy/7cdb1732e07a96d83a429774d49a31ef to your computer and use it in GitHub Desktop.
<div fxLayout="row" fxLayoutAlign='center top'>
<div fxFlex class="form-container">
<h2>Edit your profile</h2>
<form [formGroup]="userForm">
...
<mat-form-field class="full-width" appearance="outline">
<mat-label>ORCID ID</mat-label>
<input id="orcid" matInput placeholder="https://orcid.org/xxxx-xxxx-xxxx-xxxx" formControlName="orcid">
<mat-error *ngIf="orcid.errors?.pattern && (orcid.dirty || orcid.touched)">ORCID ids start with https://orcid.org/</mat-error>
<mat-error *ngIf="orcid.errors?.isORCID && (orcid.dirty || orcid.touched)">Please check your id carefully - see <a href="https://support.orcid.org/knowledgebase/articles/116780-structure-of-the-orcid-identifier" target="_blank">Structure of the ORCID Identifier</a></mat-error>
</mat-form-field>
...
</form>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment