An open API service indexing awesome lists of open source software.

https://github.com/caferrari/md-form-validator

Simplify the usage of ngMessages with the angular material design
https://github.com/caferrari/md-form-validator

angular-material angularjs javascript

Last synced: about 1 year ago
JSON representation

Simplify the usage of ngMessages with the angular material design

Awesome Lists containing this project

README

          

Angular Material Design Form Validator
======================================

A collection of directives that simplify the form validation with the Angular Material Design

[Demo](http://codepen.io/caferrari/pen/zrQBvY?editors=1010)

How to install
--------------

`bower install --save md-form-validator`

Config Default Messages
-----------------------

```javascript
angular.module("myApp").config(function(mdFormValidatorProvider) {
mdFormValidatorProvider.setMessage("required", "This field is required");
mdFormValidatorProvider.setMessage("maxlength", "Please enter no more than {maxlength} characters");
}]);
```

**With default messages you don´t need to add a md-message() for each validation:**

Before:
```html

Código


Required

```
After default messages:
```html

Código

```
To override the message:
```html

Código



This is my cool required message for this field

```