Most of the documentation for validation in dotnet core MVC talks about view models with data annotations and that obviously works really well and easily. When it comes to dynamically generated forms, however, although I can find documentation about custom client-side JS, I cannot find out about the equivalent server-side.
For example, we have a CMS to generate forms, where somebody wants e.g. an email input, which is required. We do not know this at compile time and can't create static models with attributes to achieve validation.
Is it possible, for example, to use a dynamic model in the Post action and apply validations programatically based on on the CMS configuration?
Thanks in advance.