When I enter a value in XamDataGrid Editor cell which has regular Expression validation, some values are not validated properly.
eg: “tester” is invalidated by regex “test|tester”.
I am using this assembly of yours “Infragistics3.Wpf.Editors.v10.1, Version=10.1.20101.1000” . A class called 'value constraint' seems to have a bug as follows:
if (flag && this.ShouldTestConstraint(ValueConstraintFlags.RegexPattern, constraintFlags))
{
if (this._regex == null)
try
this._regex = new Regex(this.RegexPattern);
}
catch
return true;
Match match = this._regex.Match(input);
if ((!match.Success || (match.Index != 0)) || (match.Length != input.Length)) // Leads to incorrect validation. Eg: “tester” is invalidated by regex “test|tester”.
flag = false;
errorMsg = SR.GetString("LMSG_ValueConstraint_RegexPattern");
Is there a work around to modify this behavior ?
Please guide me with the same.
Hi,
Did you try to user the same regex but with \b(like this: =@"\b(test|tester)\b" ).
Regards
I did as you suggested , but it doesnt work.