//#region src/utils/validation/validateString.ts
/**
* Validates a string field.
* @param value The value to validate.
* @param entityName The name of the entity being validated.
* @param minLength The minimum length of the string.
* @param maxLength The maximum length of the string.
* @returns An array of validation errors.
*/
const validateString = (value, entityName, minLength, maxLength) => {
	const errors = [];
	if (typeof value !== "string") errors.push(`${entityName} must be a string.`);
	else if (minLength && value.length < minLength) errors.push(`${entityName} must be at least ${minLength} characters long.`);
	else if (maxLength && value.length > maxLength) errors.push(`${entityName} must be at most ${maxLength} characters long.`);
	return errors;
};

//#endregion
export { validateString };
//# sourceMappingURL=validateString.mjs.map