Class bbq.gui.form.validator.EmailValidator
Defined in: EmailValidator.js.
Ensures that the field contains a valid email address
var field = new bbq.gui.form.TextField();
field.addValidator(new bbq.gui.form.validator.EmailValidator());
field.setValue("foo");
// throws an exception
field.getValue();
field.setValue("foo@bar.com");
// will not throw an exception
field.getValue();
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Ensures that the field contains a valid email address
|
| Method Attributes | Method Name and Description |
|---|---|
|
validate(value)
Validates the passed value.
|
Method Detail
{String} validate(value)
Validates the passed value.
| Name | Type | Comment |
|---|---|---|
| value | {Object} | The value to validate |
- Returns:
- {String} An error code. Returns null if no error occurred.