Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Have you tried to write your own validation class that implements IValidate interface?
http://world.episerver.com/Documentation/Items/Developers-Guide/EPiServer-CMS/75/Validation/Validation/
You could also use an InitializableModule to hook into the saving event:
// inside Initialize
ServiceLocator.Current.GetInstance<IContentEvents>().SavingContent += DisplayModesInitialization_SavingContent;
void DisplayModesInitialization_SavingContent(object sender, ContentEventArgs e)
{
if (DatesNotValid(e.Content))
{
e.CancelAction = true;
e.CancelReason = "Your error message";
}
}
This does not seem to work in neither 7.12.1 nor 7.14.1 (I tried upgrading since it did not work in 7.12.1).
I receive the following:
After which the whole UI gets slow and hardly works. Bug?
Image upload does not seem to work either. :)
Here's a link: http://uploadpie.com/td2bX
I wrote a blog post a while back about using the IValidator interface that may be of use: http://www.david-tec.com/2012/06/EPiServer-7-Preview---IValidator-interface/
Hi,
I am looking at adding validation to a Start Date and End Date - where the user can not enter an End Date before the Start Date. The code is in the pageType and will be used in the CMS for a page set up.
Is there any way that this can be done?
Thanks
Jon