ENHANCEMENT EmailField now uses type="email", which has the benefit of

allowing email validation when using the required="required" attribute.
If using an old browser, the "email" type will fallback to "text"
This commit is contained in:
Sean Harvey 2012-04-19 14:06:47 +12:00
parent 7dc5eb0cdc
commit 23c3fb83fb

View File

@ -10,6 +10,14 @@ class EmailField extends TextField {
return 'email text';
}
function getAttributes() {
$attrs = array(
'type' => 'email',
);
return array_merge($attrs, $this->attributes);
}
/**
* Validates for RFC 2822 compliant email adresses.
*