If you could add something to Kentico, what would it be and why?

Add Validate method for BizFormItem class

Currently when I fill a form using API there's no validation performed:

BizFormInfo formObject = BizFormInfoProvider.GetBizFormInfo("myTestForm", SiteContext.CurrentSiteID);
DataClassInfo formClass = DataClassInfoProvider.GetDataClassInfo(formObject.FormClassID);
string className = formClass.ClassName;
ObjectQuery<BizFormItem> data = BizFormItemProvider.GetItems(className);
BizFormItem formRecord = BizFormItem.New(formClass.ClassName);
formRecord.SetValue("MyTestField", "tooShort");
formRecord.Insert();

Idea is to create Validate method that passes all validation rules and returns list of rules violated, to call this method before .Insert

1 vote
Vote
Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
You have left! (?) (thinking…)
Dmitry shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Sign in with: Facebook Google
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base