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();

Class Summary
Constructor Attributes Constructor Name and Description
 
Ensures that the field contains a valid email address
Method Summary
Method Attributes Method Name and Description
 
validate(value)
Validates the passed value.

Constructor Detail

bbq.gui.form.validator.EmailValidator()

Method Detail

{String} validate(value)

Validates the passed value.
Parameters:
Name Type Comment
value {Object} The value to validate
Returns:
{String} An error code. Returns null if no error occurred.