Package detail

ngx-error-message

darioegb341MIT3.1.0

A package to display error messages in angular forms

ngx-error-message, ng-error, error message, angular handler error

readme

NgxErrorMessage

Overview

NgxErrorMessage is an Angular library that displays dynamic error messages for reactive or template-driven forms, with optional internationalization support using @ngx-translate.

Live Example

Installation

npm install ngx-error-message --save
# Optional for translations:
npm install @ngx-translate/core @ngx-translate/http-loader --save

Quick Setup

  1. Import NgxErrorMessageModule in your main module and configure @ngx-translate if you want multilingual support.
  2. Add error messages to your translation files (assets/i18n/en.json).
  3. Use the directive in your form fields:
<input formControlName="password" ngxErrorMessage />

Customization

  • Customize error messages globally or per field.
  • Use the classNames attribute for custom styles.
  • Control when to show errors with the when attribute.
  • Easily add custom patterns and validations.

Documentation

See the official documentation for advanced examples, detailed setup, and customization.


Github @darioegb

changelog

Changelog

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

Generated by auto-changelog.

v3.1.0

15 May 2025

  • Feat/angular migration #3
  • Update README.md #2
  • chore: migrate to angular 18 35f5c1b
  • chore: migrate to angular 19 aa4870d
  • chore: migrate to angular 19 & code optimization 9946415

v3.0.0

10 October 2024

  • Feat/angular migration #1
  • feat: migrate to Angular 17 and implement improvements a787272
  • migrate to angular 14 176a6a7
  • migrate to angular 16 3c7e6db

v2.2.1

16 August 2022

  • Fix/translate not change #10

v2.2.0

30 May 2022

  • Feat/angular migration #9
  • Feat/angular migration #8
  • fix dependencies problems 55f1686
  • remove ng-package obsolete 391e4dd
  • add pipe to manage error message c0ca410

v2.0.2

26 March 2021

  • update documentation and code optimization 6e27606
  • fix lint problem 51ad42c
  • Update .gitlab-ci.yml f1bd2b3

v2.0.1

25 March 2021

v2.0

22 March 2021

  • Develop #5
  • Develop #4
  • separate jobs for testing and sonar 164ed8f

1.3

7 November 2020

  • add live example update documentation #2
  • Add coverage to ngx-error-message 2b13176
  • add coverage to lib 68fcca9
  • add puppeteer for test error 51a6955

v1.2

29 May 2020

  • optimize library service #1

v1.0

16 May 2020