This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Jeremy, I would be very interested in your thoughts and any code you have on dealing with jQuery Client-Side Validation that leverages the attributes in LightSpeed. I guess I am looking for a provider for xVal or perhaps an HTMLHelper Extension that transparently hooks up validation on the client-side based on attributes on our entities or DTOs. Personally I would rather have something from you guys that doesn't depend on xVal as that causes a dependency. Thinking out loud here, but do we need an easy way to get the validators on an Entity or Entity Property that doesn't involve a lot of slow reflection? Something on the Entity class if we wanted to use xVal. I have a special interest, too, in Unique Properties that need to be validated on the client side when they need to check for uniqueness in the database. Regards, Dave |
|
|
Hi David, Im assuming you have had a look at this: http://www.mindscape.co.nz/staff/jeremy/index.php/2009/03/aspnet-mvc-part4/ - in particular the xVal rules provider which we have put into the community code project. Im thinking most people will be happy enough leveraging xVal, since it seems to becoming the defacto standard for now for auto-wiring client side validation with MVC, but we would certainly be keen on enhancing this if we can make it better :) Do you think we need to write something more specific to LightSpeed which leverages just jQuery.Validate.js? On a side note, for an earlier venture we were involved in where we built on MVC (prior to xVal being around), we took an approach of binding the .Errors collection off an entity to create the validation summary and had a helper which emitted jQuery.validate rules, so perhaps thats down the lines of what you were thinking?
Jeremy |
|
|
Hi JB, thought I’d mention that I found a small bug in the Lightspeed community xVal rules provider. The algorithm that formats the field name does peel off the initial underscore on the lightspeed entity fields, but it doesn’t capitalize the first letter. For me, because my html form field names and id’s are Pascal case, XVal did not equate “memberName” with “MemberName”. I updated my local copy of the provider and this worked great afterwards. |
|