code: def prompt_for_value(self, ctx):
          
          # Calculate the default before prompting anything to be stable.
          default = self.get_default(ctx)
  
          # If this is a prompt for a flag we need to handle this
          # differently.
          if self.is_bool_flag:
              return confirm(self.prompt, default)
  
          return prompt(self.prompt, default=default, type=self.type,
                        hide_input=self.hide_input, show_choices=self.show_choices,
                        confirmation_prompt=self.confirmation_prompt,
                        value_proc=lambda x: self.process_value(ctx, x))
docs: This is an alternative flow that can be activated in the full
          value processing if a value does not exist.  It will prompt the
          user until a valid value exists and then returns the processed
          value as result.