Interface Validator

Object validator interface. Implementors of this class can be added to any com.itmill.toolkit.data.Validatable object to verify its value. The Validatable#isValid(Object) iterates all registered Validator s, calling their validate(java.lang.Object) methods. validate(Object) should throw the com.itmill.toolkit.data.Validator.InvalidValueException if the given value is not valid by its standards.

Synopsis

Since

3.0

Inheritance Path.  com.itmill.toolkit.data.Validator

isValid(Object)

Parameters

value

the value to check

Test if the the given value is valid.

validate(Object)

Parameters

value

the value to check

Exceptions

Validator.InvalidValueException

if the value is not valid

Checks the given value against this validator. If the value is valid this method should do nothing, and if it's not valid, it should throw Validator.InvalidValueException