mcintyre321 / FormFactory

MVC5, Core or standalone - Generate rich HTML5 forms from your ViewModels, or build them programatically
http://formfactoryaspmvc.azurewebsites.net/
MIT License
304 stars 103 forks source link

No example provided for a server side validation #97

Closed parvezdesignworks closed 4 years ago

parvezdesignworks commented 4 years ago

I am creating the properties programatically using the reference given on your website, but there this no example provided for server side validation.

There is no model driven form, I am using database driven form.

Can you please help me with a server side validation.

My forms will be user defined always.

mcintyre321 commented 4 years ago

You need to do this yourself, i.e.

parse the input as a raw document, match the fields to the corresponding database records, and then run the appropriate validation rule, and add that to viewstate.

You might find this useful https://github.com/mcintyre321/AspNetCoreJTokenModelBinder , although it might need an update for whatever version of ASP.NET core we are on now