Class bbq.gui.form.validator.NotNullValidator
Defined in: NotNullValidator.js.
Ensures that the field does not have a null value
var field = new bbq.gui.form.TextField();
field.addValidator(new bbq.gui.form.validator.NotNullValidator());
// throws an exception
field.getValue();
field.setValue("foo");
// will not throw an exception
field.getValue();
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Ensures that the field does not have a null value
|
| 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.