FormField
|
+--TextField
|
+--UsernameField
public class UsernameField
extends TextField
Field Summary | |
---|---|
mixed | The maximum length permitted. |
mixed | The minimum length permitted. |
mixed | A regular expression used to a username. |
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 | |
---|---|
UsernameField(string name, string label, int required) Creates a new UsernameField. |
|
__construct(string name, string label, int required) Creates a new UsernameField. |
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 = 30
The maximum length permitted.
public mixed $MIN_SIZE = 6
The minimum length permitted.
public mixed $REGEX_USERNAME = "/^(_|\\.|[0-9]|[a-z])+\$/i"
A regular expression used to a username.
public UsernameField(string name, string label, int required)
Creates a new UsernameField.
public boolean isValid()
Checks for field errors detected by this field, including a check for blank. This method ensures that the size of the value is within range and that the value is comprised of only letters, digits, periods and underscores. If an error is detected, the setError() method is called to set the appropriate error message.
UsernameField is a field for editing a username. The username must be comprised of only letter, digits, periods and underscores.