public static function enum($input, $values, $field_name = 'enum')
    {

        //Check if array was given for $values value
        if (!is_array($values)) {
            throw new \Exception('Array is expected as values');
        }

        //Define trivial model
        $model = [
            $field_name => [
                'type' => Validate::TYPE_ENUM, 'values' => $values, Validate::REQUIRED
            ]
        ];

        $parameters = [$field_name => $input];
        Validate::model($parameters, $model);

        return $parameters[$field_name];
    }