Next.js Contact Form Integration

Job ID: 39948760

Budget: ₹1,500 – ₹12,500 INR

I have a fresh Next.js codebase waiting for one feature: a fully functional contact form that saves each submission to my existing MongoDB cluster. Here is what I need:

• Build a simple, single-page contact form in Next.js. We can finalise the exact fields together, but plan for name, email, phone number, and message.
• Implement advanced validation—email format, numeric phone check, and a reasonable message-length cap—using a lightweight library or native React hooks.
• Connect the form to my already-running MongoDB database (I will provide the connection string). Use Mongoose or the native driver, whichever you prefer, with a tidy model/schema.
• On success, clear the form and display a confirmation; on failure, surface an error message.
• Provide concise setup instructions so I can run npm install && npm run dev and see it working locally.

I am interested only in this contact-form flow for now, so keep everything lean: no extra pages, routing, or styling frameworks unless they help the job.