How to work with jquery custom validation for hubspot form


#1

How to work with jquery custom validation for hubspot form
I want form field email and website belongs to same domain for e.g email - nutan@xtensible.in and website - www.xtensible.in
So want to validate it with custom validation


#3

Hi @nutan, we don't have a very easy way to override HubSpot default validation with custom validation, but you should be able to put your own validation code in the onFormSubmit callback that's detailed here: https://developers.hubspot.com/docs/methods/forms/advanced_form_options. This thread goes over a few more options: Integration with JQuery Validator - customized validation you may want to explore, as does this Medium article: https://rschu.me/prevent-the-submit-of-any-hubspot-forms-after-a-successful-validation-5e1f230b14f1