430. Class

430.1. Zend\Form\Element\Email

430.1.1. Methods

430.1.1.1. getValidator

getValidator()

Get primary validator

Return type:ValidatorInterface

430.1.1.2. setValidator

setValidator()

Sets the primary validator to use for this element

Parameters:ValidatorInterface
Return type:Email

430.1.1.3. getEmailValidator

getEmailValidator()

Get the email validator to use for multiple or single email addresses.

Note from the HTML5 Specs regarding the regex:

“This requirement is a willful violation of RFC 5322, which defines a syntax for e-mail addresses that is simultaneously too strict (before the “@” character), too vague (after the “@” character), and too lax (allowing comments, whitespace characters, and quoted strings in manners unfamiliar to most users) to be of practical use here.”

The default Regex validator is in use to match that of the browser validation, but you are free to set a different (more strict) email validator such as ZendValidatorEmail if you wish.

Return type:ValidatorInterface

430.1.1.4. setEmailValidator

setEmailValidator()

Sets the email validator to use for multiple or single email addresses.

Parameters:ValidatorInterface
Return type:Email

430.1.1.5. getInputSpecification

getInputSpecification()

Provide default input rules for this element

Attaches an email validator.

Return type:array

Project Versions

Table Of Contents

Previous topic

429. Class

Next topic

431. Class

This Page