When creating a DelegateVerifier with only errorMessage and Condition, the verifier has the ApplicableType set correctly (checked while debugging) in the trigger link after doing AddTrigger. However, when using the constructor with 4 parameters, the trigger is added successfuly, but the TriggerItem.Type is set to null. Due to this, I believe, the validation is not fired on SetItem.
Can someone tell me how to resolve this? Do I need to set anything else before creating DelegateVerifier with 4 parameters so that the Applicable Type is set correctly?
Thanks
----------------------------------------------------------------------------------------------------------------------------------
Sample code:
string errorMessage;
// works ok
DelegateVerifier<Employee> v = new DelegateVerifier<Employee>(errorMessage, Condition); //Condition is a method name
// does not work
//DelegateVerifier<Employee> v = new DelegateVerifier<Employee>(verifierArgs, errorMessage, null, Condition); //veriferArgs - created using the default constructor and its Tag set to a custom object;
v.AddTriggers("ID");