Custom validator on a dynamic content type field - General Discussions - General Discussions - Progress Community
 General Discussions

Custom validator on a dynamic content type field

  • Custom validator on a dynamic content type field
  • Is it possible to add a custom validator to a dynamic content type field?

    Suppose to have a short text field named "Agency Code" which value must be validated on an external database table. How can I do that?

  • Hello Alessandra,

    I have just answered you in the support thicket that you have opened. Feel free to share the answer with our community.

    Regards,
    Kaloyan
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  • Kaloyan answered me that this functionality is not available out of the box.

    Kaloyan suggested to implement a custom solution, that is to subscribe to one of the exposed events for module builder and trigger our custom validation. More detailed information about the available events can be found from the link below:

    Dynamic modules events


  • I can see how to subscribe to the creating event and validate my field against external data, but how do I get the create/update to fail if it doesn't validate?