SilverCart\Forms\FormFields\EmailField
Text input field with validation for correct email format according to RFC 2822.
A copy of SilverStripe\Forms\EmailField but extends from
SilverCart\Forms\FormFields\TextField instead of SilverStripe\Forms\TextField
to provide the placeholder attribute.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2018 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class EmailField
extends TextField
{
- // members
- protected string $inputType = 'email';
- // Inherited members from TextField
- protected string $placeholder;
- // methods
- public void Type()
- public string validate()
- public array getSchemaValidation()
- // Inherited methods from TextField
- public string getPlaceholder()
- public $this setPlaceholder()
- public array getAttributes()
Hierarchy
Members
protected
- $inputType
—
string
Input type - $placeholder
—
string
Placeholder to set
Methods
public
- Type() — {@inheritdoc}
- getSchemaValidation() — Returns the schema validation.
- validate() — Validates for RFC 2822 compliant email addresses.
Inherited from SilverCart\Forms\FormFields\TextField
public
- getAttributes() — Returns the attributes
- getPlaceholder() — Returns the placeholder
- setPlaceholder() — Sets the placeholder