import com.atlassian.jira.component.ComponentAccessor
import com.opensymphony.workflow.InvalidInputException
// Start Date
def cfStart = ComponentAccessor.getCustomFieldManager().getCustomFieldObject(10400)
def cfStartValue = issue.getCustomFieldValue(cfStart) as Date
// End Date
def cfEnd = ComponentAccessor.getCustomFieldManager().getCustomFieldObject(10401)
def cfEndValue = issue.getCustomFieldValue(cfEnd) as Date
if ( cfStartValue > cfEndValue ) throw new InvalidInputException("Start Date > End Date")