'Validation of a value
@param value: the value
@return: tuple (value, error)'

def __call__(self, value):

    if value:
        field_type = str(value).lower().strip()
        items = field_type.split('    ')
        base_type = items[0]
        if (base_type == 'reference'):
            if (len(items) > 1):
                ktablename = items[1].split('.')[0]
                ktable = current.s3db.table(ktablename, db_only=True)
                if ktable:
                    return (field_type, None)
        elif (base_type in self.SUPPORTED_TYPES):
            return (field_type, None)
    return (value, self.error_message)
