In an input form Angular 6 I want to check if the input url supposed to contain the Facebook url really is a valid url which contains as substring either the string “facebook.com” or “fb.me” and if it is not the case return an error message.
Im stuck with the following:
<div nxRow>
<div nxCol="12">
<nx-formfield nxStyle='negative' nxLabel="FACEBOOK">
<input nxInput type="url" ng-model="facebook" pattern="^.*facebook.com*$/" value="{{facebook}}">
<span nxFormfieldHint>
Link zur Facebook
</span>
</nx-formfield>
</div>
</div>