FormField
|
+--TextField
|
+--EmailAddrField
public class EmailAddrField
extends TextField
Field Summary | |
---|---|
mixed | The maximum length permitted. |
mixed | A regular expression used to represent an email address. |
mixed | A regular expression used to represent an email address that must have a dot in the domain. |
mixed | True if a dot must be in the domain name of the email addres. |
Fields inherited from FORMfields.fields.TextField | |
---|---|
maxLength, minLength, size |
Fields inherited from FORMfields.fields.FormField | |
---|---|
autoPropagate, data, disableEnterHandler, displayValuesOnNewLine, editable, enabled, endingString, enterTabHandler, enterTabs, error, extraHtml, fieldBelowLabel, formError, help, hidden, htmlify, id, isData, label, labelForId, multiValues, name, required, subFieldDisplayValueSeparator, subFieldSeparator, subFieldValueSeparator, subFields, subFieldsCannotBeEmpty, trimWhitespace, validators, value, valueIsHtml |
Constructor Summary | |
---|---|
EmailAddrField(string name, string label, int required) Creates a new EmailAddrField. |
|
__construct(string name, string label, int required) Creates a new EmailAddrField. |
Method Summary | |
---|---|
boolean | isValid() Checks for field errors detected by this field, including a check for blank. |
Methods inherited from FORMfields.fields.TextField | |
---|---|
getEditableFieldTag, isValid |
public mixed $MAX_SIZE = 50
The maximum length permitted.
public mixed $REGEX_EMAIL_ADDR = "/^(_|-|\\.|'|[0-9]|[a-z]|\\+)+@(_|-|\\.|'|[0-9]|[a-z])+\$/i"
A regular expression used to represent an email address.
public mixed $REGEX_EMAIL_ADDR_STRICT = "/^(_|-|\\.|'|[0-9]|[a-z]|\\+)+@(_|-|\\.|'|[0-9]|[a-z])+?\\.(_|-|\\.|'|[0-9]|[a-z])+?\$/i"
A regular expression used to represent an email address that must have a dot in the domain.
public mixed $strictValidation = true
True if a dot must be in the domain name of the email addres. Defaulted to true.
public EmailAddrField(string name, string label, int required)
Creates a new EmailAddrField.
public boolean isValid()
Checks for field errors detected by this field, including
a check for blank. This method ensures that the email
address is in one of the forms:
user@example.com
User <user@example.com>
'User' <user@example.com>
If strictValidation is false, then the domain portion of
the email address is not required to contain a dot.
If an error is detected, the setError() method is called
to set the appropriate error message.
EmailAddrField is a field for editing an email address. This field accepts email addresses in the form: user@example.com
User <user@example.com>
'User' <user@example.com>
user@example (if strict validation is turned off)