ngx-error-message
v3.1.0
Published
A package to display error messages in angular forms
Maintainers
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 --saveQuick Setup
- Import
NgxErrorMessageModulein your main module and configure@ngx-translateif you want multilingual support. - Add error messages to your translation files (
assets/i18n/en.json). - Use the directive in your form fields:
<input formControlName="password" ngxErrorMessage />Customization
- Customize error messages globally or per field.
- Use the
classNamesattribute for custom styles. - Control when to show errors with the
whenattribute. - Easily add custom patterns and validations.
Documentation
See the official documentation for advanced examples, detailed setup, and customization.
Github @darioegb
