adding validation, required fields and error indicators