A type of property validation rule with regular expressions would make it possible to go further and validate fields directly with the correct values.
Yes, please. This would be very useful.
This would be a great idea!
This is a great idea!
So helpful! Can,t wait to try the beta!
Glad to see the beta has just been opened!
Can’t wait to give it a try, we’ll finally be able to better guide our teams and get more qualitative data.
I’m Rachel from the HubSpot Product team. Regular expressions for property validations are now in private beta (request access via Product Updates; Pro/Enterprise). Would love to hear any feedback you have on this feature via our in-app survey or this thread. Thanks!
@rwebb1 Very much pleased to see the beta!
Some feedback from us. In forms, the validation doesn’t apply unless the field is required. See examples below where a email based validation doesn’t show an error on a non-required field but the same field does when required.
Hi @CBirkett1 - could you please file a Support ticket so my team can take a look? The validation should apply regardless of whether a field is required in the Form.
Hi @rwebb1 - I had a ticket with Hubspot support, and they said they would pass it on.
I couldn’t find a place to comment specifically on this beta, so I thought I’d reach out here!
Love where it is going though
@rwebb1 I added some feedback in this thread: https://community.hubspot.com/t5/HubSpot-Ideas/Increase-character-limit-for-regex-validated-properties/idi-p/1086832
If the plan is to retain the 100 character limit for now, that’ll need to be more transparent in the documentation and during the property creation screen. I spent quite awhile attempting to troubleshoot why my regex was showing a test value to be invalid because it just showed the standard error message. But when I finally just created the property and went to a record to test it, the error explicitly indicated that the value must contain 100 characters or less, which was not conveyed during property creation regex setup or testing that is available.
I would still strongly advocate for increasing the character limit there if possible, but at a minimum the limit needs to be more transparent in documentation and as a part of property creation. Thanks!
Thanks for the feedback @NBBeale ! We are investigating whether it’s possible to increase the 100-character limit. This limit is outlined in the Knowledge Base but we’re also looking into ways to make it more explicit in-app so it’s more transparent when you are building the property.
Empty
Hi everyone! Some additional updates:
1. We’ve increased the character limit from 100 to 1,000 for text properties which have regex validation applied.
2. We now have a private beta open for AI-generated regular expressions for property validations, which will help you generate regex for property validations with the assistance of AI.
But this rule by regex validation, does not work if that property is used in a legacy form editor, it only works with the new form editor. It would be VERY useful that works on legacy editor, as the new form editor do not have the to set the form as RAW HTML like the legacy one does
@rwebb1 I’m so glad that regex is available for field validation -I just wish it wasn’t so limited.
A use case I’d like it to support - and it doesn’t seem to be at the moment - is to create a validation rule that doesn’t allow form submission if the field contains a specific word.
We get a lot of spam submissions thourhg our website Contact Us form from people trying to sell us SEO services so I tried to apply the following regex rule:
^(?!.*\bSEO\b).+$
Upon reading up on the current capabilities, the validation doesn’t allow for regex exclusion.
Would love to see this feature.


