Hi,
So we use HubSpot forms on landing pages and website and would like to know if is there any way to enforce that only 10 digits mobile number should be entered by the user without that it should’t allow the user to fill the form?
We are using HubSpot Pro (Marketing & Sales), any soltuion on this matter will be highly appreciated.
Thansk
Yes, you can update this in the property settings for phone (HubSpot default field):
Hope this helps!
@rebeccatravels thanks for your response this setting is already turned on but still it accepts the number. For example for India the mobile number digits are 10 (excluding country code), so if I enter the number with 8 or 9 digits the form still accepts the numbers.
Ideally based on the country code it should give the error to the form filler. Is that something feasible?
Thansk in advance.
Yes, the “learn more” link in the screen shot above goes here: Set up phone number property validation
You can follow the steps under the section Add phone number validations to a property to add. Hope that clarification helps!
To enforce a 10-digit mobile number in HubSpot forms, use field validation with a regular expression pattern such as ^\d{10}$. This ensures users enter exactly 10 numeric digits and prevents invalid submissions.
Hi @AJ_Kakrot,
This depends on the form editor you’re using. In the legacy form editor, you can specify this here.
In the new form editor, these validation rules are applied: Set validation rules for a property
Best regards!