March 2015 - Digital Tool Factory blog March 2015 - Digital Tool Factory blog

The Digital Tool Factory Blog

How to fix problems with FoolProof Validation in asp.net mvc

For some reason the otherwise delightful nuget Package FoolProof Validation does not work with modern version of the entity framework – rather, the validation works just fine, but it chokes when you try to update the database with entity framework.

The workaround I found was to validate on a view model – and then translate that viewmodel to the actual model, which is then sent to the database.


20
Mar 15


Written By Steve French

 

How to fix problems with Jquery Validate and dynamically generated forms

I recently came across the problem of validating dynamically generated forms with the jquery.validate plugin – everything worked well with the original form, but when there were multiple forms available I got peculiar syntax errors. A quick googling told me to simply add the following code

$(“form”).validate();

to the javascript and everything would be fine. I tried that to no avail. Then I read things more closely and realized that I needed to specify which form I wanted to validate, I changed the code to

$(“#editForm”).validate();

And voila! Problem so.


03
Mar 15


Written By Steve French

 




Copyright 2011 Digital Tool Factory. All Rights Reserved. Powered by raw technical talent. And in this case, WordPress.