17 references to Field
Microsoft.AspNetCore.Components.Forms (1)
EditContextDataAnnotationsExtensions.cs (1)
129
_messages.Add(_editContext.
Field
(memberName), validationResult.ErrorMessage!);
Microsoft.AspNetCore.Components.Forms.Tests (16)
EditContextDataAnnotationsExtensionsTest.cs (4)
53
editContext.GetValidationMessages(editContext.
Field
(nameof(TestModel.RequiredString))));
58
editContext.GetValidationMessages(editContext.
Field
(nameof(TestModel.IntFrom1To100))));
157
editContext.NotifyFieldChanged(editContext.
Field
(fieldName));
161
editContext.NotifyFieldChanged(editContext.
Field
(nameof(TestModel.RequiredString)));
EditContextTest.cs (12)
29
var fieldIdentifier = editContext.
Field
("testFieldName");
48
var fieldOnThisModel1 = editContext.
Field
("field1");
49
var fieldOnThisModel2 = editContext.
Field
("field2");
68
var fieldThatWasModified = editContext.
Field
("field1");
69
var fieldThatRemainsModified = editContext.
Field
("field2");
70
var fieldThatWasNeverModified = editContext.
Field
("field that was never modified");
90
var field1 = editContext.
Field
("field1");
91
var field2 = editContext.
Field
("field2");
242
var fieldOnThisModel1 = editContext.
Field
("field1");
243
var fieldOnThisModel2 = editContext.
Field
("field2");
262
editContext.NotifyFieldChanged(editContext.
Field
(nameof(EquatableModel.Property)));
266
Assert.True(editContext.IsModified(editContext.
Field
(nameof(EquatableModel.Property))));