class TTY::Prompt::Question::Checks::CheckRequired

Check if input is required

def self.call(question, value)

def self.call(question, value)
  if question.required? && !question.default? && value.nil?
    [value, question.message_for(:required?)]
  else
    [value]
  end
end