Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #14 from PolymerElements/fix-docs
Browse files Browse the repository at this point in the history
add docs for this thing
  • Loading branch information
notwaldorf committed Oct 20, 2015
2 parents ff267b5 + d2d9069 commit 3891c02
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion iron-validatable-behavior.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,20 @@
<script>

/**
* Use `Polymer.IronValidatableBehavior` to implement an element that validates user input.
* `Use Polymer.IronValidatableBehavior` to implement an element that validates user input.
* Use the related `Polymer.IronValidatorBehavior` to add custom validation logic to an iron-input.
*
* By default, an `<iron-form>` element validates its fields when the user presses the submit button.
* To validate a form imperatively, call the form's `validate()` method, which in turn will
* call `validate()` on all its children. By using `Polymer.IronValidatableBehavior`, your
* custom element will get a public `validate()`, which
* will return the validity of the element, and a corresponding `invalid` attribute,
* which can be used for styling.
*
* To implement the custom validation logic of your element, you must override
* the protected `_getValidity()` method of this behaviour, rather than `validate()`.
* See [this](https://github.com/PolymerElements/iron-form/blob/master/demo/simple-element.html)
* for an example.
*
* ### Accessibility
*
Expand Down

0 comments on commit 3891c02

Please sign in to comment.