Creating a custom content validator
You create a custom validator in Java by implementing the com.tridion.validation.ContentValidator interface. You then need to configure the validator in the cd_ugc_conf.xml configuration file.
About this task
You can activate a custom Validator , either on the website that your visitors visit or on the Community service where you enable storage and retrieval of submitted (visitor) comments and ratings.
- Visitor website
- The advantage of implementing your Content Validator on the website on which your visitors submit comments and ratings is that you have full access to their information. The website is also the first line of defense against spam and DDoS attacks. However, interacting with the User Generated Content database will be slower because you need to interact with the Web service using HTTP requests.
- Community service
- If you implement your Content Validator in the Community service, which enables storage and retrieval of submitted (visitor) comments and ratings, the Validator's access to the User Generated Content database is direct and consequently faster, but you have only limited access to visitor information.