collection input generates `required` attribute if it has `prompt` option

closes #919