return float rather than bool from duration validator