String replacement for required_if_not