Fixed update and added validation for required fields.