Print Page | Close Window

Validation Levels

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=2997
Printed Date: 28-Mar-2024 at 9:09am


Topic: Validation Levels
Posted By: jbelci
Subject: Validation Levels
Date Posted: 09-Oct-2011 at 7:23pm
Hi Guys

I am trying to implement a 3 level validation system inside my app using dev force verification. The basic concept is to have 3 levels
1) Error - Data must be fixed prior to saving (e.g null values in nullable column)
2) Serious warning - To save this data, user must log in with an admin account and give reasons why (e.g. fails non critical business rules)
3) Warining - all users can save, just want to display as an issue.

So we do want to have the system save data even if there is a data error (in certain circumstances).

My questions are
1) is this even possible?
2) are there any code snippets available to help or can someone guide me in the right direction to get this working

Thanks
Jason



Replies:
Posted By: sbelini
Date Posted: 13-Oct-2011 at 10:49am
Hi Jason,

You can implement a custom verifier that would return an error or warning.

You can find examples on custom Verifiers in the  http://drc.ideablade.com/xwiki/bin/view/Documentation/validation-create-custom-verifier - DevForce Resource Center .

Note that when returning a VerifierResult, you can return: 

http://drc.ideablade.com/ApiDocumentation/IdeaBlade.Validation~IdeaBlade.Validation.VerifierResultCode.html - VerifierResultCode .Error
                             .ErrorInsuficientData
                             .Ok
                             .OkNotApplicable
                             .OkWarning

Regards,
   Silvio.


Posted By: jbelci
Date Posted: 16-Oct-2011 at 6:45pm
Thanks Silvio

Thats given me some ideas.  I'll play with it and see what i can do

Jason



Print Page | Close Window