validation - Throwing a message when Updating/Validating Part contents/data -
crosspost: https://orchard.codeplex.com/discussions/455498
when updating part, in driverresult editor, how can manually throw warning message when implementing custom validation?
i want add custom validation date fields, values dependent on other field in content item (dates in part need between specific date in content item's field).
which leads me question, can set validation in model properties between 1 another? if there 2 properties startdate , enddate, doable in model declare end date must after start date?
you can add model validation errors using "updater" parameter being passed in:
updater.addmodelerror("startdate", t("please enter date in future"));
Comments
Post a Comment