added 'required' detection and err msgs for validating user input