validation-messages - Angular 2 module for displaying validation messages on template driven forms
Demo
View all the directives in action at https://rahulbhooteshwar.github.io/validation-messages
Dependencies
- Angular (requires Angular 4.3.2 or higher, tested with 4.3.2)
Installation
Install above dependencies via npm.
Now install validation-messages
via:
npm install --save validation-messages
SystemJS
Note:If you are using
SystemJS
, you should adjust your configuration to point to the UMD bundle. In your systemjs config file,map
needs to tell the System loader where to look forvalidation-messages
:
map: 'validation-messages': 'node_modules/validation-messages/bundles/validation-messages.umd.js'
Once installed you need to import the main module:
;
The only remaining part is to list the imported module in your application module. The exact method will be slightly
different for the root (top-level) module for which you should end up with the code similar to (notice ValidationMessagesModule .forRoot()
):
; @
Other modules in your application can simply import ValidationMessagesModule
:
; @
Usage
License
Copyright (c) 2017 Rahul Bhooteshwar. Licensed under the MIT License (MIT)