angular-bootstrap-validation

WebJar for angular-bootstrap-validation

License

License

MIT
Categories

Categories

Angular User Interface Web Frameworks
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

angular-bootstrap-validation
Last Version

Last Version

0.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

angular-bootstrap-validation
WebJar for angular-bootstrap-validation
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/guilhermegeek/angular-bootstrap-validation

Download angular-bootstrap-validation

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/angular-bootstrap-validation/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>angular-bootstrap-validation</artifactId>
    <version>0.0.5</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/angular-bootstrap-validation/
implementation 'org.webjars.bower:angular-bootstrap-validation:0.0.5'
// https://jarcasting.com/artifacts/org.webjars.bower/angular-bootstrap-validation/
implementation ("org.webjars.bower:angular-bootstrap-validation:0.0.5")
'org.webjars.bower:angular-bootstrap-validation:jar:0.0.5'
<dependency org="org.webjars.bower" name="angular-bootstrap-validation" rev="0.0.5">
  <artifact name="angular-bootstrap-validation" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='angular-bootstrap-validation', version='0.0.5')
)
libraryDependencies += "org.webjars.bower" % "angular-bootstrap-validation" % "0.0.5"
[org.webjars.bower/angular-bootstrap-validation "0.0.5"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Angular Bootstrap Validation

Directives to apply bootstrap styles to AngularJs form elements. You can either apply success, error or both styles. In case of success state, it's only applied to dirty forms.

Check the demo: http://gui-acab.github.io/angular-bootstrap-validation/

Instalation

jQuery 1.6 or newer is required

With Bower

bower install angular-bootstrap-validation

For a manual installation copy the angular-boostrap-validation.js inside dist folder.

Quick Start

Include the module bs-validation

angular.module('app', ['bs-validation']);

You've three directives:

  • bs-has - Apply both success and error directives
  • bs-has-success - Add 'has-success' class
  • bs-has-error - Add 'has-error' class

You can use directives at the form element or in .form-group elements.

<form novalidate bs-has> <!-- Apply both success and error styles to name and address -->
	<div class="form-group">
		<label class="control-label">Name</label>
		<input type="text" class="form-control" required ng-model="name" />
	</div>
	<div class="form-group">
		<label class="control-label">Address</label>
		<input type="text" class="form-control" required ng-model="address" />
	</div>
</form>

<form novalidate>
	<div class="form-group" bs-has-success> <!-- Apply sucess styles to name only -->
		<label class="control-label">Name</label>
		<input type="text" class="form-control" required ng-model="name" />
	</div>
	<div class="form-group" bs-has> <!-- Apply sucess and error styles to address only -->
		<label class="control-label">Address</label>
		<input type="text" class="form-control" required ng-model="address" />
	</div>
</form>

Authors

I've only modified a little bit the code and put it on bower. The REAL authors are:

The SO question where they've published the code: here

Versions

Version
0.0.5