Class NullValidator

Inheritance Path.  java.lang.Object-> com.itmill.toolkit.data.validator.NullValidator

NullValidator(String, boolean)

Parameters

errorMessage

- The error message to display on invalidation.

allowNull

- Are nulls allowed?

Create a new NullValidator

getErrorMessage()

Get the error message that is displayed in case the value is invalid.

isNullAllowed()

True if nulls are allowed.

isValid(Object)

Parameters

value

- The value to validate.

True of the value is valid.

setErrorMessage(String)

Set the error message to be displayed on invalid value.

setNullAllowed(boolean)

Parameters

allowNull

- Do we allow nulls?

Sets if nulls are to be allowed.

validate(Object)

Parameters

value

- The value to validate.

Exceptions

Validator.InvalidValueException

- The value was invalid.

Validate the data given in value.