Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

EPiServer Forms custom validator

$
0
0

I'm trying to implement a custom validator for my form elements. I started following this post By Mark van Dijk. There it says that in order to get the javascript to load correctly, the following lines of code needs to be implemented:

[ServiceConfiguration(ServiceType = typeof(IViewModeExternalResources))]
public class FormsViewModeExternalResource : IViewModeExternalResources
{
public IEnumerable> Resources
{
get
{
var arrRes = new List>
{
new Tuple("script", "/ClientResources/ViewMode/FormsValidators.js"),
};
return arrRes;
}
}
}



Correct me if I'm wrong, but as what I can see, the file FormsValidators.js have been removed in 3.0.0 and "baked into" EPiServerForms.js? Then when I substitute the line above with the following:

/ClientResources/ViewMode/EPiServerForms.js



I end up with a 404.

Should I be using a different approach here or what?

Thanks in advance

/ Carl


Viewing all articles
Browse latest Browse all 9076

Trending Articles