This commit is contained in:
@@ -51,7 +51,7 @@ namespace AyaNova.Biz
|
||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetSerial", FieldKey = "Serial" });
|
||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetDollarAmount", FieldKey = "DollarAmount" });
|
||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetCount", FieldKey = "Count" });
|
||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetRoles", FieldKey = "Roles" });
|
||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetUserType", FieldKey = "UserType" });
|
||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetStartDate", FieldKey = "StartDate" });
|
||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetEndDate", FieldKey = "EndDate" });
|
||||
l.Add(new AyaFormFieldDefinition { LtKey = "WidgetNotes", FieldKey = "Notes" });
|
||||
|
||||
@@ -265,12 +265,10 @@ namespace AyaNova.Biz
|
||||
if (proposedObj.StartDate > proposedObj.EndDate)
|
||||
AddError(ApiErrorCode.VALIDATION_STARTDATE_AFTER_ENDDATE, "StartDate");
|
||||
|
||||
//Enum is valid value
|
||||
//Note: because of the way the flags work as powers of 2 and with the 1 being the first flag value, basically any value up to the "All" value will be valid
|
||||
//because you can make any number from 0 to all using any combination of the flags so the only thing that will fail is less than zero or greater than All
|
||||
if (!proposedObj.Roles.IsValid())
|
||||
//Enum is valid value
|
||||
if (!proposedObj.UserType.IsValid())
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "Roles");
|
||||
AddError(ApiErrorCode.VALIDATION_INVALID_VALUE, "UserType");
|
||||
}
|
||||
|
||||
//Any form customizations to validate?
|
||||
|
||||
Reference in New Issue
Block a user