1 write to _editContext
Microsoft.AspNetCore.Components.Forms (1)
EditContextDataAnnotationsExtensions.cs (1)
70
_editContext
= editContext ?? throw new ArgumentNullException(nameof(editContext));
12 references to _editContext
Microsoft.AspNetCore.Components.Forms (12)
EditContextDataAnnotationsExtensions.cs (12)
72
_messages = new ValidationMessageStore(
_editContext
);
74
_editContext
.OnFieldChanged += OnFieldChanged;
75
_editContext
.OnValidationRequested += OnValidationRequested;
105
_editContext
.NotifyValidationStateChanged();
112
var validationContext = new ValidationContext(
_editContext
.Model, _serviceProvider, items: null);
114
Validator.TryValidateObject(
_editContext
.Model, validationContext, validationResults, true);
129
_messages.Add(
_editContext
.Field(memberName), validationResult.ErrorMessage!);
134
_messages.Add(new FieldIdentifier(
_editContext
.Model, fieldName: string.Empty), validationResult.ErrorMessage!);
138
_editContext
.NotifyValidationStateChanged();
144
_editContext
.OnFieldChanged -= OnFieldChanged;
145
_editContext
.OnValidationRequested -= OnValidationRequested;
146
_editContext
.NotifyValidationStateChanged();