Angular 2 retrieve error message from custom validator
Use AbstractControl#getError()
:
<div
class="ui pointing orange basic label"
*ngIf="form.getError('validateSomething', 'workDate') as error>
{{ error }}
</div>
DEMO
Use AbstractControl#getError()
:
<div
class="ui pointing orange basic label"
*ngIf="form.getError('validateSomething', 'workDate') as error>
{{ error }}
</div>
DEMO