The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

"Error 400: Invalid data: Unknown StateName value" With Text Input Values

Highlighted
New Member

"Error 400: Invalid data: Unknown StateName value" With Text Input Values

Hello,


I'm developing an integration for a client using Constant Contact, and I believe I've nailed just about all of the intricacies of the REST API (including the combinations of StateName/StateCode and CountryName/CountryCode issues).  Now that the integration is live, they've found some of their customers aren't successfully signing up, and I've tracked it down to an issue with values entered for StateName.  The signup form uses Text inputs for State/Province, and the values that have been rejected thus far are "B.C." and "Yukon".  I can see how some might appreciate this data validation, but it's a hindrance in my case.  Is there any way to turn this validation off?  (I'm also going to need to turn this validation off for CountryName.)


If it can't be done, using custom fields will be fine.


Thanks for your time.

1 REPLY 1
Highlighted
Moderator

The validation you're talking

The validation you're talking about is unable to be turned off.  This is part of our core validation and is universal to all people using the API.  A possible better solution is to instead offer a prepopulated drop down menu instead of text inputs.  This way you can control the values being sent and will not have any problems with incorrect or improperly formated entries.

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

View API documentation, code samples, get your API key.

Visit Page

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured