You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

v-textfield

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

v-textfield

User-friendly text fields in AngularJS

0.1.4
latest
Source
npm
Version published
Maintainers
1
Created
Source

User-friendly text fields in AngularJS

You can use vTextfild to show (hide) validation messages, error/success input indicators, or interactive Float Labels. It basically adds the following classes to the v-textfield directive:

  • is-focused
  • is-blured
  • is-valid
  • is-invalid
  • is-dirty
  • is-pristine
  • is-required
  • is-optional
  • has-value
  • has-noValue
  • has-placeholder
  • has-noPlaceholder

Demos

Installation

  • Use bower bower install v-textfield, or download files from the github repo
  • Reference v-textfield.css and v-textfield.js in your index.html file
  • Reference the module in your app: angular.module('myApp', [ 'vTextfield' ])

Usage

<v-textfield class="Textfield--default">
  <label hint="Optional">Name</label>
  <input name="myName" type="text" ng-model="model.myName" v-textfield-input>
</v-textfield>

<v-textfield class="Textfield--default">
  <label>Email</label>
  <input name="myEmail" type="email" ng-model="model.myEmail" required v-textfield-input>

  <ng-messages for="myForm.myEmail.$error">
    <ng-message when="email">Please enter a valid email address.</ng-message>
    <ng-message when="required">You did not enter a email address.</ng-message>
  </ng-messages>
</v-textfield>

<v-textfield class="vTextfield--default">
  <label>Password</label>
  <input name="myPassword" type="password" ng-model="model.myPassword" ng-minlength="6" required v-textfield-input>

  <ng-messages for="myForm.myPassword.$error">
    <ng-message when="minlength">Your password is too short.</ng-message>
    <ng-message when="required">Please enter a password.</ng-message>
  </ng-messages>
</v-textfield>

Keywords

AngularJS

FAQs

Package last updated on 17 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts