% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-core-genes.R
\name{validate_param}
\alias{validate_param}
\title{Safe Parameter Validation with Fallback (Global Strategy)}
\usage{
validate_param(
  value,
  default,
  min_val = 1,
  max_val = NULL,
  param_name = "parameter"
)
}
\arguments{
\item{value}{Input value}

\item{default}{Default value}

\item{min_val}{Minimum value (inclusive)}

\item{max_val}{Maximum value (inclusive, optional)}

\item{param_name}{Parameter name (for warning messages)}
}
\value{
Validated value
}
\description{
Unified handling of invalid parameters (e.g., ncol <= 0) to ensure
  03/04 module stability.
}
\examples{
workers <- validate_param(4, default = 2, min_val = 1, max_val = 8, param_name = "workers")
}
