Form fields custom validation


#1

Is there a way to build custom validations for form fields in hubspot by overriding validations which is available in current.js library file. we are having requirements to validate certain fields which should not accept special characters as input values and certain fields should accept only English characters.


#2

Yes Chand,
Using hubspot form you will get some specific default validation for fields, will be quite tricky to override them, how ever there is work around for this problem. You can use hubspot form to achieve same, provided you have all fields hidden,
lets say you need name field, make it hidden now using js you can append an input box, and can easily run custom validation on this input box. and data can be easily submitted using javascript or jquery. For custom validation you can use any jquery library.