a guest Jul 17th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- modelState.AddModelError(violation.PropertyName, violation.ErrorMessage);
- modelState.SetModelValue(violation.PropertyName, new ValueProviderResult(violation.AttemptedValue, violation.AttemptedValue == null ? string.Empty : violation.AttemptedValue.ToString(), Thread.CurrentThread.CurrentCulture));
RAW Paste Data