public static function validateCustomType($type, $value, $field_name, $model = [])
    {
        if (!isset(self::$custom_types[$type])) {
            throw new \Exception('type_not_found');
        }
        $callback = self::$custom_types[$type]['callback'];

        $output = false;

        if ($callback($value, $model, $output) === false) {
            //Incorrect
            throw new IncorrectParametersException([$field_name]);
        } else {
            //update output
            return $output;
        }
    }