New Posts New Posts RSS Feed: Change VerifierResult Description
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Change VerifierResult Description

 Post Reply Post Reply
Author
swylie View Drop Down
Newbie
Newbie
Avatar

Joined: 19-May-2009
Posts: 6
Post Options Post Options   Quote swylie Quote  Post ReplyReply Direct Link To This Post Topic: Change VerifierResult Description
    Posted: 22-Jun-2009 at 3:29pm

What is the best way to change the RequiredVerifier's description.  It is picking up by default the string name of the property.  The property value name in the model is different than the UI has.  I want to override the description returned when the verifier returns.

Back to Top
eileenv View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 15-Jun-2007
Location: United States
Posts: 68
Post Options Post Options   Quote eileenv Quote  Post ReplyReply Direct Link To This Post Posted: 25-Jun-2009 at 3:56pm

Do you want the property name to be changed for all verifiers registered for that type and property name?

If so, one way to do it is to register a PropertyNameToDisplayNameTranslator delegate on the VerifierEngine.
 
For example:
 
      _verifierEngine.PropertyNameToDisplayNameTranslator = delegate(Type pType, String pPropertyName) {
        if ((pType == typeof(Employee)) && pPropertyName.Equals("City")) {
          pPropertyName = "NewCity";
        }
        return pPropertyName;
      };
 
The above would substitute "City" with "NewCity" in the description of any verifier registered on the VerifierEngine associated with type=Employee and propertyName="City".
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down