FormField
|
+--TextField
|
+--VariableNameField
public class VariableNameField
extends TextField
Field Summary | |
---|---|
mixed | A regular expression used to represent a variable name. |
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 | |
---|---|
VariableNameField(string name, string label, int required, mixed maxLen, mixed minLen) Creates a new VariableNameField. |
|
__construct(string name, string label, int required, mixed maxLen, mixed minLen) Creates a new VariableNameField. |
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 $REGEX_VARIABLE_NAME = "/^(_|[a-z])(_|[0-9]|[a-z])+\$/i"
A regular expression used to represent a variable name.
public VariableNameField(string name, string label, int required, mixed maxLen, mixed minLen)
Creates a new VariableNameField.
public boolean isValid()
Checks for field errors detected by this field, including a check for blank. This method ensures that the value is comprised of only letters, digits and underscores and starts with either a letter or underscore. If an error is detected, the setError() method is called to set the appropriate error message.
VariableNameField is a field for editing the name of a programming variable. The variable name must be comprised of only letters, digits and underscores and must start with either a letter or underscore.