add readonly/required attributes