sky.engine.field
Class EmailField
java.lang.Object
sky.engine.field.BaseField
sky.engine.field.EmailField
- All Implemented Interfaces:
- Field
- public class EmailField
- extends BaseField
- implements Field
|
Constructor Summary |
EmailField(java.lang.String name,
boolean required)
Constructor |
EmailField(java.lang.String name,
boolean required,
java.lang.String dflt,
int maxlen,
int vislen)
Constructor |
|
Method Summary |
void |
addValue(java.lang.String value)
Add the specified string a value of this field. |
java.lang.String |
checkValue(java.lang.String value)
Check to make sure that the input value is actually an email address. |
| Methods inherited from class sky.engine.field.BaseField |
addAlias, clear, destory, getAliases, getData, getDataSize, getHTMLData, getName, getRequired, getSQLData, getStringData, hasAliases, hasValue, removeAliases, removeValues, toHTML, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface sky.engine.field.Field |
addAlias, clear, destory, getAliases, getDataSize, getHTMLData, getName, getRequired, getSQLData, getStringData, hasAliases, removeAliases, removeValues, toHTML, toString |
EmailField
public EmailField(java.lang.String name,
boolean required)
- Constructor
- Parameters:
name - field namerequired - true, if field must have a value; else, false.
EmailField
public EmailField(java.lang.String name,
boolean required,
java.lang.String dflt,
int maxlen,
int vislen)
- Constructor
- Parameters:
name - field namerequired - true, if field must have a value, else false.dflt - default value of this field, if no value has been specified.maxlen - maximum length of field value.vislen - visible length of the GUI associated with this field.
checkValue
public java.lang.String checkValue(java.lang.String value)
throws ErrorMessage
- Check to make sure that the input value is actually an email address.
- Specified by:
checkValue in interface Field
- Parameters:
value - input parameter that will be checked or transformed.
- Returns:
- the original input value.
- Throws:
ErrorMessage - if the original input value is not an email address.
addValue
public void addValue(java.lang.String value)
throws ErrorMessage
- Add the specified string a value of this field.
- Specified by:
addValue in interface Field
- Parameters:
value - value that needs to be added to this field.
- Throws:
ErrorMessage - if there is a problem in adding the value.