Email Input State Variable Reference

Table of contents


Introduction

Email Input state variables represent email address text inputs. They extend Text Input state variables, so the text format info properties apply. An empty value is valid, so an email input is not required.

Constructor

Syntax

ctl.createPage({
	...,
	stateVarInfo:[
		{type:'emailInput', ...},
	],
})

Parameters


Instance methods

Inherited methods

Note: The component() method returns an EmailInputSvComponent, a subclass of the Text Input component that sets the <input> type to email.


val()

Syntax

val(value)
val()

Gets or sets the value. Assigning a value that is not valid (see isValid()) causes an assertion failure.


isValid()

Syntax

isValid(value)
isValid()

Return true if value (or the current state variable value if omitted) is empty or is considered a valid email address. A non-empty value must match a basic address pattern: allowed local-part characters, followed by a @, followed by one or more dot-separated domain labels. A dot is not required in the domain, so a@b is valid.

Return value

A Boolean. Returns true if the current state variable value is considered valid and false otherwise.


Inherited properties


DOM element properties