setter for the required flag