Form validation / error message + not allow duplicate email

@Kevin-C Thank you for the suggestions.

I am a bit new to Hubspot integrations, could you clarify which api/validation are you talking about?

Is there API that Hubspot offers, that I could use for email “duplicate” validation? Or is this something that we need to develop by ourselves?

Basically we need to do the validation before the form is submitted, via javacript?