HubSpot Ideas

clmthaz

Regex for property validation rules

A type of property validation rule with regular expressions would make it possible to go further and validate fields directly with the correct values.

 

Screenshot 2023-11-06 at 15.47.41.png

HubSpot Updates
January 09, 2025 11:00 AM

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. 

 

Delivered
January 06, 2025 02:12 PM

January 06, 2025 02:11 PM

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. 

December 10, 2024 12:26 PM

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.

In Beta
November 14, 2024 02:58 PM

👋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! 

14 Replies
PeterJr
Participant

Yes, please. This would be very useful.

Bjorn-Ramboll
Participant

This would be a great idea! 

Bjorn-Ramboll
Participant

This is a great idea! 

ACortijos
Member | Diamond Partner

So helpful! Can,t wait to try the beta!

clmthaz
Member

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.

rwebb1
HubSpot Product Team

👋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! 

CBirkett1
Participant | Diamond Partner

@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.

Screenshot 2024-12-09 at 10.50.32.png

Screenshot 2024-12-09 at 10.50.53.png



rwebb1
HubSpot Product Team

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.

CBirkett1
Participant | Diamond Partner

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


NBBeale
Member

@rwebb1 I added some feedback in this thread: https://community.hubspot.com/t5/HubSpot-Ideas/Increase-character-limit-for-regex-validated-properti...

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!

rwebb1
HubSpot Product Team

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. 

rwebb1
HubSpot Product Team
 
rwebb1
HubSpot Product Team

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. 

 

DMira
Member

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