'Get value from raw value and sanitize according to data type.'

def get_value(self, value, validate=False, template=None, translation=None):

    t = self.type()
    if (t == Schema.STRING):
        _value = self._get_string(value)
    elif (t == Schema.INTEGER):
        _value = self._get_integer(value)
    elif (t == Schema.NUMBER):
        _value = self._get_number(value)
    elif (t == Schema.MAP):
        _value = self._get_map(value, validate, translation)
    elif (t == Schema.LIST):
        _value = self._get_list(value, validate, translation)
    elif (t == Schema.BOOLEAN):
        _value = self._get_bool(value)
    elif (t == Schema.ANY):
        _value = value
    if validate:
        self.schema.validate_constraints(_value, self.context, template=template)
    return _value
