> For the complete documentation index, see [llms.txt](https://msk-satheesh-5599.gitbook.io/ng-mat-forms/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://msk-satheesh-5599.gitbook.io/ng-mat-forms/attributes/fields/errormessage.md).

# errorMessage

### **Description**

This property is helps to show the error message of the form field.it needs to be contains the property of the validator as key and errormessage as value.

### Hint:

> * Type:   Object
> * Property of NgMatFormField

### Example

```typescript
Fields: NgMatFormFields[] = [{
    type: 'input',
    label: 'User Name',
    placeholder: 'Enter a User Name',
    formControlName: 'name',
    directive: 'numericOnly',
    maxLength: '10',
    validators: [Validators.required, Validators.email],
    errorMessage: {
        required: 'required!',
        email: 'Please provide valid email'
    }
}];
```
