1 write to _editContext
Microsoft.AspNetCore.Components.Forms (1)
EditContextDataAnnotationsExtensions.cs (1)
72
_editContext
= editContext ?? throw new ArgumentNullException(nameof(editContext));
12 references to _editContext
Microsoft.AspNetCore.Components.Forms (12)
EditContextDataAnnotationsExtensions.cs (12)
74
_messages = new ValidationMessageStore(
_editContext
);
76
_editContext
.OnFieldChanged += OnFieldChanged;
77
_editContext
.OnValidationRequested += OnValidationRequested;
107
_editContext
.NotifyValidationStateChanged();
114
var validationContext = new ValidationContext(
_editContext
.Model, _serviceProvider, items: null);
116
Validator.TryValidateObject(
_editContext
.Model, validationContext, validationResults, true);
131
_messages.Add(
_editContext
.Field(memberName), validationResult.ErrorMessage!);
136
_messages.Add(new FieldIdentifier(
_editContext
.Model, fieldName: string.Empty), validationResult.ErrorMessage!);
140
_editContext
.NotifyValidationStateChanged();
146
_editContext
.OnFieldChanged -= OnFieldChanged;
147
_editContext
.OnValidationRequested -= OnValidationRequested;
148
_editContext
.NotifyValidationStateChanged();