Feb. 7, 2024, 7:10 p.m. | Bryan Smith

DEV Community dev.to

Want a straightforward article on submitting a form in Nextjs to a server action using an HTML event onBlur? And with form validation?


Then this is the article for you. I found the documentation on Nextjs.org lacking, so I'm putting this here for you.


This article is suitable for other events, such as onChange. Still, I prefer onBlur; as you know, the user is done typing, and you don't have to mess with debouncing.





The Form


This tutorial has a …

article documentation event form found frontend html next.js server typescript validation webdev

Senior Machine Learning Engineer

@ GPTZero | Toronto, Canada

ML/AI Engineer / NLP Expert - Custom LLM Development (x/f/m)

@ HelloBetter | Remote

Doctoral Researcher (m/f/div) in Automated Processing of Bioimages

@ Leibniz Institute for Natural Product Research and Infection Biology (Leibniz-HKI) | Jena

Seeking Developers and Engineers for AI T-Shirt Generator Project

@ Chevon Hicks | Remote

Director, Venture Capital - Artificial Intelligence

@ Condé Nast | San Jose, CA

Senior Molecular Imaging Expert (Senior Principal Scientist)

@ University of Sydney | Cambridge (USA)