public bool Validate(out string error) { if(NumericValue == 1 && StringValue == "foo") { error = "Field cannot have values: 1 and 'foo' at the same time"; return false; } error = null; return true; }