streamlined adding 'required' class to form fields