Validate year input