Name Date Size #Lines LOC

..--

.github/H25-Apr-2025-3414

demo/H25-Apr-2025-16692

test/H25-Apr-2025-214117

.bower.jsonH A D25-Apr-20251.4 KiB4242

.gitignoreH A D25-Apr-202517 21

.travis.ymlH A D25-Apr-2025784 2524

CONTRIBUTING.mdH A D25-Apr-20253.4 KiB7839

README.mdH A D25-Apr-20251.7 KiB4318

bower.jsonH A D25-Apr-20251.1 KiB3433

index.htmlH A D25-Apr-20251,003 3114

iron-validatable-behavior.htmlH A D25-Apr-20254.6 KiB150121

README.md

1
2<!---
3
4This README is automatically generated from the comments in these files:
5iron-validatable-behavior.html
6
7Edit those files, and our readme bot will duplicate them over here!
8Edit this file, and the bot will squash your changes :)
9
10The bot does some handling of markdown. Please file a bug if it does the wrong
11thing! https://github.com/PolymerLabs/tedium/issues
12
13-->
14
15[![Build status](https://travis-ci.org/PolymerElements/iron-validatable-behavior.svg?branch=master)](https://travis-ci.org/PolymerElements/iron-validatable-behavior)
16
17_[Demo and API docs](https://elements.polymer-project.org/elements/iron-validatable-behavior)_
18
19
20##Polymer.IronValidatableBehavior
21
22`Use Polymer.IronValidatableBehavior` to implement an element that validates user input.
23Use the related `Polymer.IronValidatorBehavior` to add custom validation logic to an iron-input.
24
25By default, an `<iron-form>` element validates its fields when the user presses the submit button.
26To validate a form imperatively, call the form's `validate()` method, which in turn will
27call `validate()` on all its children. By using `Polymer.IronValidatableBehavior`, your
28custom element will get a public `validate()`, which
29will return the validity of the element, and a corresponding `invalid` attribute,
30which can be used for styling.
31
32To implement the custom validation logic of your element, you must override
33the protected `_getValidity()` method of this behaviour, rather than `validate()`.
34See [this](https://github.com/PolymerElements/iron-form/blob/master/demo/simple-element.html)
35for an example.
36
37### Accessibility
38
39Changing the `invalid` property, either manually or by calling `validate()` will update the
40`aria-invalid` attribute.
41
42
43