Trouble resetting a LiveView form programmatically

I do not understand your code. In particular, the handle_event("validate" part makes no sense to me. What is supposed to happen when phx-change is triggered?