Developer Announcements

Dadams
HubSpot Employee
HubSpot Employee

Bugfix: Form field validation and CRM properties

What's changing?

We'll be adding new validation to our Forms API. This validation will require that any fields being used in a form match with a corresponding CRM property. The name of the field must match the name of a CRM property for the object type of the field, otherwise the field will be treated as invalid. Any requests to create or update forms that include one of these invalid fields will result in a FORM_FIELDS_NOT_VALID error:

{
  ...
  "formFieldValidationErrors": {
    "0-1/invalid_field_name": [
      {
        "fieldName": "invalid_field_name",
        "objectTypeId": "0-1",
        "formFieldValidationErrorOption": "FIELD_NAME_DOES_NOT_MATCH_PROPERTY_NAME",
        "referenceString": "0-1/invalid_field_name"
      }
    ]
  "type": "FORM_FIELDS_NOT_VALID"
  ...
}

This will affect both the legacy Forms API as well as the new v3 Forms API still in beta.

 

Existing forms that have invalid fields will not be changed, but any updates to these forms will require that the invalid fields be fixed before the update will succeed.

 

When is this happening?

This new validation will go into effect on May 16th.

 

Please let us know if you have any questions by replying below.

1 Reply 1
ChehakWadhdwa
Member | Diamond Partner
Member | Diamond Partner

Bugfix: Form field validation and CRM properties

hi @Dadams 

i think you should wait for the beta until 16th May to get it stabled , as we can not add any custom code as its alternate , its  not possible .

0 Upvotes