Print Page | Close Window

Validation

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2991
Printed Date: 13-May-2026 at 7:18pm


Topic: Validation
Posted By: CaptainOrgange
Subject: Validation
Date Posted: 05-Oct-2011 at 11:41pm
Hi, I am still new to DevForce and is checking whether or not I am going to use this for my next Project.
I have a question on the validation.
 
I have got the generated classes, and then I have my Metadata classes, all the validtion in my test project works great. But no I want a screen where my model has got a Navigation Property eg.
 
Class : SUV
Navidation Property : Car
When I Save the SUV class, my validation on the SUV class fires and is shown in the UI, but I have a few properties on the Car class that I need to validate as well. How can I achieve this ?
 
kind regards
CaptainOrgange



Replies:
Posted By: kimj
Date Posted: 06-Oct-2011 at 1:45pm

Validation in DevForce is done by default when an entity changes -- property level validation when a property changes, and instance-level validation when saved. If the Car object here hasn't changed, it won't be validated by default. You can force validation on an object or one of its properties by calling one of the overloaded VerifierEngine.Execute* methods.

Since you essentially have custom validation needs here, a custom verifier would likely help. With a custom verifier you write the validation logic and determine when the verifier should be triggered. Here's some information from the DevForce Resource Center to get started -- http://drc.ideablade.com/xwiki/bin/view/Documentation/validation-create-custom-verifier - http://drc.ideablade.com/xwiki/bin/view/Documentation/validation-create-custom-verifier .




Print Page | Close Window