rea-ng-validate
v0.0.4
Published
Set bootstrap form error/warning states based on angular's form states
Downloads
3
Maintainers
Readme
ng-validate
Demo
Usage
Install:
npm i rea-ng-validate
JS:
angular.module('app', ['rea.misc.validate']);
HTML:
<form>
<div class="form-group" rea-validate-group>
<label class="control-label">Email address</label>
<input
type="email"
class="form-control"
placeholder="Email"
ng-model="app.form.email"
ng-pattern="/[a-zA-Z-_\.]@[a-zA-Z-_\.]/"
rea-validate
>
<span
rea-validate-hint
class="help-block"
>This text describes the error and is only visible if the above input is in error-state</span>
</div>
</form>