Implement a function called calculate_area in a file named /app/solution.py. The function should take two parameters, width and height, both of which will be positive integers. The function must return the area of a rectangle calculated using the formula:
text
area = width * height
Requirements:
The function should validate the inputs to ensure both width and height are positive integers. If either input is invalid, the function should raise a ValueError with the message "Width and height must be positive integers."
If both inputs are valid, the function should return the computed area as an integer.
Ensure that the implementation is efficient, and handle edge cases such as very large integers gracefully.
Make sure that the function is defined at the top level and not nested within any other function or class.