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)
53editContext.GetValidationMessages(editContext.Field(nameof(TestModel.RequiredString)))); 58editContext.GetValidationMessages(editContext.Field(nameof(TestModel.IntFrom1To100)))); 157editContext.NotifyFieldChanged(editContext.Field(fieldName)); 161editContext.NotifyFieldChanged(editContext.Field(nameof(TestModel.RequiredString)));
EditContextTest.cs (12)
29var fieldIdentifier = editContext.Field("testFieldName"); 48var fieldOnThisModel1 = editContext.Field("field1"); 49var fieldOnThisModel2 = editContext.Field("field2"); 68var fieldThatWasModified = editContext.Field("field1"); 69var fieldThatRemainsModified = editContext.Field("field2"); 70var fieldThatWasNeverModified = editContext.Field("field that was never modified"); 90var field1 = editContext.Field("field1"); 91var field2 = editContext.Field("field2"); 242var fieldOnThisModel1 = editContext.Field("field1"); 243var fieldOnThisModel2 = editContext.Field("field2"); 262editContext.NotifyFieldChanged(editContext.Field(nameof(EquatableModel.Property))); 266Assert.True(editContext.IsModified(editContext.Field(nameof(EquatableModel.Property))));