New Posts New Posts RSS Feed: Validation
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Validation

 Post Reply Post Reply
Author
CaptainOrgange View Drop Down
Newbie
Newbie


Joined: 05-Oct-2011
Posts: 4
Post Options Post Options   Quote CaptainOrgange Quote  Post ReplyReply Direct Link To This Post Topic: Validation
    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
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down