Can't this data be extracted from the validation framework, which already contains the list of attributes and if they are required or not?