Add required attribute for inputs.