Contact Field Requirements (4.1.6.1)

Discussions concerning general integration topics.

Moderator: Phil Barton

Post Reply
phustead
Posts: 4
Joined: Mon Mar 09, 2015 9:23 am

Contact Field Requirements (4.1.6.1)

Post by phustead »

I have an application that places orders into SoftPro from various Illinois websites (Order Translator). Since the upgrade last Friday from 4.0.5.1 to 4.1.6.1, I’ve been receiving some validation errors on the seller contact “Name” field. It’s stating that “Value must be no longer that 50 characters”. In the past, this field allowed for 150 characters. Has something changed? Also, is there limit on the contact “Email” field?
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Contact Field Requirements (4.1.6.1)

Post by BobRichards »

The Contact.Name field can be a maximum of 150 characters. I'm not aware of any changes in this area. Can you provide an example?

Also, the Email field maximum is 255 characters.
Bob Richards, Senior Software Developer, SoftPro
phustead
Posts: 4
Joined: Mon Mar 09, 2015 9:23 am

Re: Contact Field Requirements (4.1.6.1)

Post by phustead »

Here is the exception and stack trace:

EXCEPTION
Method: Check
Error Message: Value must be no longer than 50 characters

at SoftPro.EntityModel.ValidationConstraintInstance.Check(Object value)
at SoftPro.EntityModel.EntityExecutionContext.CheckConstraints()
at SoftPro.EntityModel.EntityExecutionContext.Dispose(Boolean completed)
at SoftPro.EntityModel.EntityExecutionContext.Scope.Dispose()
at SoftPro.EntityModel.Field`1.set_Value(T value)
at Principal.set_Name(String )
at CallSite.Target(Closure , CallSite , Object , String )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)

INNER EXCEPTION
Method: Validate
Error Message: Value must be no longer than 50 characters.

Stack Trace:
at SoftPro.ClientModel.Validations.ValidationAttribute.Validate(ValidationContext contextMode, ValidationAttribute[] constraints, ITypeDescriptorContext context, Object value)
at SoftPro.EntityModel.ValidationConstraintInstance.Check(Object value)

There are only two values being set near the exception... Contact.Name and Contact.Email
Are there any Contact fields that are limited to 50 characters? I can verify if any of those are being set.
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: Contact Field Requirements (4.1.6.1)

Post by BobRichards »

The hint in the stack trace is the validation of the Principal "Name" property. In the inheritance chain, Buyers and Sellers derive from Principal. Its logic will append the name fields to form the Contact.Name. In the case of a Joint type Buyer/Seller (for example), if you set each of the First, Middle, Last and Suffix fields for each of the names to their maximum number of character, it will be greater than the maximum number of characters allowed in the Name field and will generate the validation error.

There is no way around this behavior. You must change the logic of your application to prevent this situation by summing the number of characters in the input fields and perform some type of limiting/truncating operation.
Bob Richards, Senior Software Developer, SoftPro
Post Reply