21 references to GetValidationMessages
Microsoft.AspNetCore.Components.Forms (4)
EditContext.cs (2)
179=> GetValidationMessages(FieldIdentifier.Create(accessor)); 203=> !GetValidationMessages(fieldIdentifier).Any();
ValidationMessageStore.cs (2)
60/// To get the validation messages across all validation message stores, use <see cref="EditContext.GetValidationMessages(FieldIdentifier)"/> instead 70/// To get the validation messages across all validation message stores, use <see cref="EditContext.GetValidationMessages(FieldIdentifier)"/> instead
Microsoft.AspNetCore.Components.Forms.Tests (5)
EditContextDataAnnotationsExtensionsTest.cs (2)
53editContext.GetValidationMessages(editContext.Field(nameof(TestModel.RequiredString)))); 58editContext.GetValidationMessages(editContext.Field(nameof(TestModel.IntFrom1To100))));
EditContextTest.cs (3)
145}, editContext.GetValidationMessages(field).OrderBy(x => x)); // Sort because the order isn't defined 148Assert.Empty(editContext.GetValidationMessages(fieldWithNoState)); 152Assert.Equal(new[] { "Store 2 message 1", }, editContext.GetValidationMessages(field));
Microsoft.AspNetCore.Components.Web (4)
Forms\FieldCssClassProvider.cs (1)
24var isValid = !editContext.GetValidationMessages(fieldIdentifier).Any();
Forms\InputBase.cs (1)
288if (EditContext.GetValidationMessages(FieldIdentifier).Any())
Forms\ValidationMessage.cs (1)
71foreach (var message in CurrentEditContext.GetValidationMessages(_fieldIdentifier))
Forms\ValidationSummary.cs (1)
66CurrentEditContext.GetValidationMessages(new FieldIdentifier(Model, string.Empty));
Microsoft.AspNetCore.Components.Web.Tests (8)
Forms\InputBaseTest.cs (5)
301Assert.Empty(rootComponent.EditContext.GetValidationMessages(fieldIdentifier)); 326Assert.Equal(new[] { "Bad date value" }, rootComponent.EditContext.GetValidationMessages(fieldIdentifier)); 336Assert.Empty(rootComponent.EditContext.GetValidationMessages(fieldIdentifier)); 355Assert.Equal(new[] { "Bad date value" }, rootComponent.EditContext.GetValidationMessages(fieldIdentifier)); 361Assert.Empty(rootComponent.EditContext.GetValidationMessages(fieldIdentifier));
Forms\InputDateTest.cs (1)
29var validationMessages = rootComponent.EditContext.GetValidationMessages(fieldIdentifier);
Forms\InputNumberTest.cs (1)
44var validationMessages = rootComponent.EditContext.GetValidationMessages(fieldIdentifier);
Forms\InputSelectTest.cs (1)
187var validationMessages = rootComponent.EditContext.GetValidationMessages(fieldIdentifier);