This commit is contained in:
@@ -399,8 +399,17 @@ namespace AyaNova.Biz
|
||||
AddError(ValidationErrorType.InvalidValue, "Roles");
|
||||
}
|
||||
|
||||
CustomFieldsValidator.Validate(this, ct.FormCustom.SingleOrDefault(x => x.FormKey == FormAvailableFields.WIDGET_FORM_KEY), proposedObj.CustomFields);
|
||||
//Any form customizations to validate?
|
||||
var FormCustomization = ct.FormCustom.SingleOrDefault(x => x.FormKey == FormAvailableFields.WIDGET_FORM_KEY);
|
||||
if (FormCustomization != null)
|
||||
{
|
||||
//Yeppers, do the validation, there are two, the custom fields and the regular fields that might be set to required
|
||||
|
||||
//validate users choices for required non custom fields
|
||||
|
||||
//validate custom fields
|
||||
CustomFieldsValidator.Validate(this, FormCustomization, proposedObj.CustomFields);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,17 @@ using System.ComponentModel.DataAnnotations;
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
|
||||
/*
|
||||
|
||||
- Like DataFilter, holds a JSON fragment in one field and the form key in another field
|
||||
- JSON FRAGMENT holds items that differ from stock, Hide not valid for non hideable core fields
|
||||
- FieldKey "fld"
|
||||
- Hide "hide"
|
||||
- Required "required"
|
||||
- Type One of values from AyDataType but not tags or enum (bool, date, date time, decimal, number, picklist(FUTURE), and text)
|
||||
- e.g.: {template:[{fld:"ltkeyfieldname",hide:"true/false",required:"true/false", type:"bool"},{fld:"ltkeyfieldname",hide:"true/false",required:"true/false", type:"text"]}
|
||||
|
||||
*/
|
||||
public partial class FormCustom
|
||||
{
|
||||
public long Id { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user