Webform - Mandatory text field depending on select option state
I found a module called Webform Validation that lets you achieve this without any custom code.

To accomplish the above, add the 'Require at least one of two fields' validator under 'form validation' and then select both components that you want to validate against.