Hi,
It's WinForms.
When the user corrects the data, it does not clear.
This is a Hello-World kind of app. Simple POC.
protected override bool OnValidateFieldValue(int fieldIndex, object value)
{
bool toReturn = true;
switch ((CustomerFieldIndex)fieldIndex)
{
case CustomerFieldIndex.Country:
if (value.ToString() != "USA" && this.User != null && this.User.Country == "USA")
{
SetEntityFieldError(CustomerFields.Country.Name, "USA users can only set country to USA", true);
toReturn = false;
}
break;
default:
toReturn = true;
break;
}
return toReturn;
}