Added dimension validation

Added dimension validation for resolution input