This repository was archived by the owner on Dec 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 14
14
< script >
15
15
16
16
/**
17
- * Use `Polymer.IronValidatableBehavior` to implement an element that validates user input.
17
+ * `Use Polymer.IronValidatableBehavior` to implement an element that validates user input.
18
+ * Use the related `Polymer.IronValidatorBehavior` to add custom validation logic to an iron-input.
19
+ *
20
+ * By default, an `<iron-form>` element validates its fields when the user presses the submit button.
21
+ * To validate a form imperatively, call the form's `validate()` method, which in turn will
22
+ * call `validate()` on all its children. By using `Polymer.IronValidatableBehavior`, your
23
+ * custom element will get a public `validate()`, which
24
+ * will return the validity of the element, and a corresponding `invalid` attribute,
25
+ * which can be used for styling.
26
+ *
27
+ * To implement the custom validation logic of your element, you must override
28
+ * the protected `_getValidity()` method of this behaviour, rather than `validate()`.
29
+ * See [this](https://github.com/PolymerElements/iron-form/blob/master/demo/simple-element.html)
30
+ * for an example.
18
31
*
19
32
* ### Accessibility
20
33
*
You can’t perform that action at this time.
0 commit comments