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
.
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:
Inherited from DataElementBehaviors.Basic:
error: String
model: String
name: String
valid: Boolean
Inherited from DataElementBehaviors.TextField;
pristine: Boolean
touched: Boolean
*All other HTML5 properties.
Inherited from DataElementBehaviors.TextField;
validate(): Boolean
(override)
*All other HTML5 methods.
Inherited from DataElementBehaviors.Basic:
data-element-added
validation
*All other HTML5 events.