A lightweight Angular library for cleaner, declarative validation error messages in forms.
ngx-valdemort is an Angular library that provides a cleaner, more maintainable way to display validation error messages in forms. It replaces verbose conditional template logic with a simple, declarative component, reducing boilerplate and improving code readability. The library supports both reactive and template-driven forms, with experimental support for Angular's signal-based forms.
Angular developers building complex forms who want to reduce template clutter and standardize error messaging across their applications.
Developers choose ngx-valdemort because it eliminates repetitive validation markup, offers centralized default messages, and integrates seamlessly with Angular's form APIs while keeping templates clean and declarative.
Simpler, cleaner Angular validation error messages
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Replaces verbose if-else blocks with clean <ng-template> directives using valError, making form templates significantly more readable, as shown in the README examples comparing before and after code.
Allows setting global default messages for common validators via <val-default-errors>, reducing duplication and ensuring consistency across forms without repetitive markup.
Works seamlessly with both reactive and template-driven forms using <val-errors>, and offers experimental signal-based form support with <val-signal-errors>, covering Angular's form paradigms.
Injects field labels into error messages via the label attribute, simplifying message personalization and improving user experience without manual string interpolation.
Signal-based form integration is marked as experimental, meaning it may be unstable, subject to breaking changes, or lack full feature parity as Angular evolves.
Deeply tied to Angular's form APIs, so any core changes or deprecations could require updates or cause compatibility issues, adding maintenance overhead.
While it simplifies standard validators, custom validators require manual template definitions for each error key, which can be cumbersome compared to inline logic for complex cases.