Hi guys,
I have to integrate my Kentico e-commerce with external services. They send me data that should be stored as a form in Kentico. So I wrote a code that creates bizform record like that: BizFormInfo formObject = BizFormInfoProvider.GetBizFormInfo(fname, SiteContext.CurrentSiteID);
DataClassInfo formClass = DataClassInfoProvider.GetDataClassInfo(formObject.FormClassID);
string className = formClass.ClassName;
ObjectQuery@BizFormItem@ data = BizFormItemProvider.GetItems(className);
BizFormItem formRecord = BizFormItem.New(formClass.ClassName);
but when I'm saving record using formRecord.Insert();
I noticed that data I inserted is not validated against rules created for every field at design-time (the simpliest one is a length limitation)Also I didn't find in documentation or forum any reference on how can I execute validation of form data before saving? I want to send all validation errors back to external service as a structured data, for that service to parse validation errors and display them formatted at their UI.How can I do that?
↧