How do I test forms?
Last checked 31 Aug 2026
Short answer
Submit every form with valid, invalid and empty data, confirm error messages appear, and check that submitted data actually lands where it should (database, inbox or integration).
What to actually check
A form "working" visually isn't the same as working correctly. For every form on the site:
- Submit with valid data — confirm a success message and that the data arrives where expected (a database table, an email via Resend, a Stripe checkout, etc.).
- Submit with missing required fields — confirm validation blocks it with a clear message, not a silent failure.
- Submit invalid formats — a malformed email, letters in a phone field, an absurdly long string — and confirm the form rejects or handles it gracefully.
- Double-submit — click submit twice quickly and check you don't get duplicate database rows or duplicate emails.
- Refresh mid-fill — check whether losing unsaved input is acceptable for that form, or whether it needs a warning.
Checking where the data actually goes
If the form writes to your database, ask Lovable to confirm:
Show me where submissions from the [contact/signup] form are stored, and confirm the table has RLS so only I can read submitted entries.
If it sends an email, send a real test submission and check the inbox (including spam) rather than trusting a "sent" message alone.
A prompt for validation
Add proper validation to the [form name] form: required fields, email format checking, and a clear inline error message per field.
What usually goes wrong
- No server-side validation — client-side checks can be bypassed, so malicious or malformed data still reaches your database unless rules exist there too (RLS/constraints).
- Contact forms with no rate limiting, letting spam bots flood submissions.
- Success message shown even when the underlying save/send actually failed.
- Forms that don't work with a password manager or autofill, frustrating real users.
See also /questions/how-do-i-test-user-registration for sign-up forms specifically.
Was this answer helpful?
Related questions
- AnswerHow do I back up my project before launch?Bookmark the current state in Version history, and push to a connected GitHub/GitLab repo via Git sync so you have a full backup outside Lovable too.
- AnswerHow do I test SEO?Check that every page has a unique title and meta description, images have alt text, the site generates a sitemap, and preview the page as a search engine or social share would see it.
- AnswerHow do I test admin permissions?Log in as a non-admin account and try to reach every admin action directly (URLs, buttons, API calls) to confirm the server — not just the UI — blocks it.
- AnswerHow do I test my Lovable app?Work through core user flows manually in Preview and on a published link, on desktop and mobile, as a logged-out user and as a normal account — not just as the builder.