pub fn validate_package_names(
names: &[&str],
config: Option<&ValidationConfig>,
) -> Result<()>Expand description
What: Validate multiple package names.
Inputs:
names: Slice of package names to validateconfig: Optional validation configuration (uses defaults if None)
Output:
Result<()>indicating success, or the first validation error encountered
Details:
- Validates each package name in the slice
- Returns the first error encountered, or
Ok(())if all are valid - In strict mode, empty slice returns an error; in lenient mode, it’s allowed
§Errors
- Returns
Err(ArchToolkitError::EmptyInput)if names slice is empty and strict mode is enabled - Returns
Err(ArchToolkitError::InvalidPackageName)for the first invalid package name - Returns
Err(ArchToolkitError::InputTooLong)for the first package name exceeding maximum length