diff --git a/blazor/stepper/steps-validation.md b/blazor/stepper/steps-validation.md index 8d8b006d57..1c97269686 100644 --- a/blazor/stepper/steps-validation.md +++ b/blazor/stepper/steps-validation.md @@ -269,8 +269,8 @@ You can validate the fields within the stepper component. In the below shared ex private bool ValidateCurrentStep() { bool isStepValid = true; - var context = new ValidationContext(model); - var validationResults = new List(); + var context = new System.ComponentModel.DataAnnotations.ValidationContext(model); + var validationResults = new List(); isStepValid = Validator.TryValidateObject(model, context, validationResults, true); if (currentStep == 1)