This commit is contained in:
@@ -229,6 +229,22 @@ namespace AyaNova.Biz
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "DeliveryAddress", "In app delivery should not specify a delivery address");
|
||||
}
|
||||
|
||||
if (proposedObj.EventType == NotifyEventType.UnitMeterReadingMultipleExceeded)
|
||||
{
|
||||
//validate decvalue is a long
|
||||
try
|
||||
{
|
||||
long lValue= System.Convert.ToInt64(proposedObj.DecValue);
|
||||
if(lValue < 5){//arbitrary value
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "DecValue", "Value is too small, must be 5 or higher");
|
||||
}
|
||||
}
|
||||
catch (System.OverflowException)
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "DecValue", "Value is too large, must be less than 9,223,372,036,854,775,807");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user