protected override void OnInitialized() { if (CurrentEditContext == null) { throw new InvalidOperationException($"Invalid Edit Context"); } CurrentEditContext.AddFluentValidation(ServiceProvider, validator); }
protected override void OnInitialized() { if (CurrentEditContext == null) { throw new InvalidOperationException($"{nameof(FluentValidationValidator)} requires a cascading " + $"parameter of type {nameof(EditContext)}. For example, you can use {nameof(FluentValidationValidator)} " + $"inside an {nameof(EditForm)}."); } CurrentEditContext.AddFluentValidation(ShouldValidate); }
protected override void OnInitialized() { if (CurrentEditContext == null) { throw new InvalidOperationException($"{nameof(FluentValidationValidator)} requires a cascading " + $"parameter of type {nameof(EditContext)}. For example, you can use {nameof(FluentValidationValidator)} " + $"inside an {nameof(EditForm)}."); } CurrentEditContext.AddFluentValidation(ServiceProvider, DisableAssemblyScanning, Validator, this); }
protected override void OnInit() { if (CurrentEditContext == null) { throw new InvalidOperationException($"{nameof(FluentValidationValidator)} requires a cascading " + $"parameter of type {nameof(EditContext)}. For example, you can use {nameof(FluentValidationValidator)} " + $"inside an {nameof(EditForm)}."); } Console.WriteLine(Validator == null); CurrentEditContext.AddFluentValidation(ServiceProvider, Validator); }