How To: Disable built-in Episerver Validators in IValidationService

Jakke Korpelainen
1 min readJan 11, 2016

--

Now, you’ve created a page programmatically with some validation errors (e.g. URLSegment, ExternalUrl) and you’re having issues with the page autosave/publish validating the content. Say no more — The solution is here.

Create an InitializationModule that’ll hook onto DataFactory events that occur on publish/save/checkin to your liking. Then get an instance of ValidationService in the event handler and modify it’s RegisteredValidators to match your needs.

Remember to add the removed validators back if necessary, I’ll let them rot a while for now because this took me quite a time for me to figure out by browsing the SDK as I couldn’t find anything on this online.

--

--