| OLD | NEW |
| 1 | 1 |
| 2 <!--- | 2 <!--- |
| 3 | 3 |
| 4 This README is automatically generated from the comments in these files: | 4 This README is automatically generated from the comments in these files: |
| 5 iron-input.html | 5 iron-input.html |
| 6 | 6 |
| 7 Edit those files, and our readme bot will duplicate them over here! | 7 Edit those files, and our readme bot will duplicate them over here! |
| 8 Edit this file, and the bot will squash your changes :) | 8 Edit this file, and the bot will squash your changes :) |
| 9 | 9 |
| 10 The bot does some handling of markdown. Please file a bug if it does the wrong | 10 The bot does some handling of markdown. Please file a bug if it does the wrong |
| 11 thing! https://github.com/PolymerLabs/tedium/issues | 11 thing! https://github.com/PolymerLabs/tedium/issues |
| 12 | 12 |
| 13 --> | 13 --> |
| 14 | 14 |
| 15 [](https://travis-ci.org/PolymerElements/iron-input) | 15 [](https://travis-ci.org/PolymerElements/iron-input) |
| 16 | 16 |
| 17 _[Demo and API docs](https://elements.polymer-project.org/elements/iron-input)_ | 17 _[Demo and API docs](https://elements.polymer-project.org/elements/iron-input)_ |
| 18 | 18 |
| 19 | 19 |
| 20 ##<iron-input> | 20 ## <iron-input> |
| 21 | 21 |
| 22 `<iron-input>` adds two-way binding and custom validators using `Polymer.IronVal
idatorBehavior` | 22 `<iron-input>` adds two-way binding and custom validators using `Polymer.IronVal
idatorBehavior` |
| 23 to `<input>`. | 23 to `<input>`. |
| 24 | 24 |
| 25 ### Two-way binding | 25 ### Two-way binding |
| 26 | 26 |
| 27 By default you can only get notified of changes to an `input`'s `value` due to u
ser input: | 27 By default you can only get notified of changes to an `input`'s `value` due to u
ser input: |
| 28 | 28 |
| 29 ```html | 29 ```html |
| 30 <input value="{{myValue::input}}"> | 30 <input value="{{myValue::input}}"> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 50 It may be desirable to only allow users to enter certain characters. You can use
the | 50 It may be desirable to only allow users to enter certain characters. You can use
the |
| 51 `prevent-invalid-input` and `allowed-pattern` attributes together to accomplish
this. This feature | 51 `prevent-invalid-input` and `allowed-pattern` attributes together to accomplish
this. This feature |
| 52 is separate from validation, and `allowed-pattern` does not affect how the input
is validated. | 52 is separate from validation, and `allowed-pattern` does not affect how the input
is validated. |
| 53 | 53 |
| 54 ```html | 54 ```html |
| 55 <!-- only allow characters that match [0-9] --> | 55 <!-- only allow characters that match [0-9] --> |
| 56 <input is="iron-input" prevent-invalid-input allowed-pattern="[0-9]"> | 56 <input is="iron-input" prevent-invalid-input allowed-pattern="[0-9]"> |
| 57 ``` | 57 ``` |
| 58 | 58 |
| 59 | 59 |
| OLD | NEW |