Skip to content

Latest commit

 

History

History
73 lines (46 loc) · 1.3 KB

data-text-input.md

File metadata and controls

73 lines (46 loc) · 1.3 KB

<- Back to Table of Contents

data-text-input

Bind a String value from a JSON object to an HTML <input type="text" /> tag.

All validation is fired first on blur, then on input.

Usage

Given the JSON data:

{
    user: {
        name: 'Kevin Sheppard'
    }
}

Use as follows:

<input 
    type="text"
    is="data-text-input" 
    name="fullName" 
    model="{{user.name}}" 
    required />

To get the expected output:

output

Properties

Inherited from DataElementBehaviors.Basic:

  • error: String
  • model: String
  • name: String
  • valid: Boolean

Inherited from DataElementBehaviors.TextField;

  • pristine: Boolean
  • touched: Boolean

*All other HTML5 properties.

Methods

Inherited from DataElementBehaviors.TextField;

  • validate(): Boolean (override)

*All other HTML5 methods.

Inherited from DataElementBehaviors.Basic:

  • data-element-added
  • validation

Events

*All other HTML5 events.

Behaviors