This advanced module for AngularJS provides you with facilities to automate form validation, error display and input decorations. No more manual application of
ngClass directives to all the form elements and creating error messages for every possible input. Just install this module and provide input requirements the standard way by using native HTML5 attributes like
required and standard AngularJS directives like
ngMax and the like. No need to add directives to all the input fields.
You can configure this module to decorate forms as you see fit only once and all the forms of your application will automatically benefit from it.
- Works out of the box with almost zero configuration
- No need to specify any additional directives besides standard input constraints
- Has built-in supports for Bootstrap 3
- Automatically decorates valid, invalid and non-modified input fields
- Automatically adds error messages to invalid input fields
- Supports translations (i18n) and provides some built-in languages
- Designed with flexibility in mind, almost every aspect of this module can be configured and overridden
- You can easily select DOM elements to decorate by providing custom traversing functions
- You can change the way forms are decorated by overriding some aspects of existing decorators or by providing your own implementation of them
- You can change the way error list is rendered by modifying default error list renderer or by providing your own implementation
- jQuery is not required since version
Feel free to play with the Demo.
Please see the GitHub repository for more info.
The MIT License (MIT)
Copyright (c) 2014 Slava Fomin II
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.