public static function float($input, $min = null, $max = null, $field_name = 'float')
    {
        //Define trivial model
        $model = [
            $field_name => ['type' => Validate::TYPE_FLOAT, Validate::REQUIRED]
        ];

        if ($min !== null) {
            $model[$field_name]['min'] = $min;
        }

        if ($max !== null) {
            $model[$field_name]['max'] = $max;
        }

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

        return $parameters[$field_name];
    }