All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.vaadin.polymer.iron.IronValidatableBehavior Maven / Gradle / Ivy

The newest version!
/*
 * This code was generated with Vaadin Web Component GWT API Generator, 
 * from iron-validatable-behavior project by The Polymer Authors
 * that is licensed with http://polymer.github.io/LICENSE.txt license.
 */
package com.vaadin.polymer.iron;

import com.vaadin.polymer.elemental.*;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.core.client.JsArray;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsProperty;
import jsinterop.annotations.JsType;


/**
 * 

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
for an example.

*

Accessibility

*

Changing the invalid property, either manually or by calling validate() will update the
aria-invalid attribute.

*/ @JsType(isNative=true) public interface IronValidatableBehavior { @JsOverlay public static final String NAME = "Polymer.IronValidatableBehavior"; @JsOverlay public static final String SRC = "iron-validatable-behavior/iron-validatable-behavior.html"; /** *

True if the last call to validate is invalid.

* * JavaScript Info: * @property invalid * @type Boolean * @behavior VaadinDatePicker */ @JsProperty boolean getInvalid(); /** *

True if the last call to validate is invalid.

* * JavaScript Info: * @property invalid * @type Boolean * @behavior VaadinDatePicker */ @JsProperty void setInvalid(boolean value); /** *

Name of the validator to use.

* * JavaScript Info: * @property validator * @type String * @behavior VaadinDatePicker */ @JsProperty String getValidator(); /** *

Name of the validator to use.

* * JavaScript Info: * @property validator * @type String * @behavior VaadinDatePicker */ @JsProperty void setValidator(String value); /** *

Namespace for this validator. This property is deprecated and should
not be used. For all intents and purposes, please consider it a
read-only, config-time property.

* * JavaScript Info: * @property validatorType * @type String * @behavior VaadinDatePicker */ @JsProperty String getValidatorType(); /** *

Namespace for this validator. This property is deprecated and should
not be used. For all intents and purposes, please consider it a
read-only, config-time property.

* * JavaScript Info: * @property validatorType * @type String * @behavior VaadinDatePicker */ @JsProperty void setValidatorType(String value); /** *

Returns true if the value is valid, and updates invalid. If you want
your element to have custom validation logic, do not override this method;
override _getValidity(value) instead.

* * JavaScript Info: * @method validate * @param {Object} value * @behavior VaadinDatePicker * @return {boolean} */ boolean validate(JavaScriptObject value); /** * * * JavaScript Info: * @method hasValidator * @behavior VaadinDatePicker * @return {boolean} */ boolean hasValidator(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy