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)
53
editContext.
GetValidationMessages
(editContext.Field(nameof(TestModel.RequiredString))));
58
editContext.
GetValidationMessages
(editContext.Field(nameof(TestModel.IntFrom1To100))));
EditContextTest.cs (3)
145
}, editContext.
GetValidationMessages
(field).OrderBy(x => x)); // Sort because the order isn't defined
148
Assert.Empty(editContext.
GetValidationMessages
(fieldWithNoState));
152
Assert.Equal(new[] { "Store 2 message 1", }, editContext.
GetValidationMessages
(field));
Microsoft.AspNetCore.Components.Web (4)
Forms\FieldCssClassProvider.cs (1)
24
var isValid = !editContext.
GetValidationMessages
(fieldIdentifier).Any();
Forms\InputBase.cs (1)
288
if (EditContext.
GetValidationMessages
(FieldIdentifier).Any())
Forms\ValidationMessage.cs (1)
71
foreach (var message in CurrentEditContext.
GetValidationMessages
(_fieldIdentifier))
Forms\ValidationSummary.cs (1)
66
CurrentEditContext.
GetValidationMessages
(new FieldIdentifier(Model, string.Empty));
Microsoft.AspNetCore.Components.Web.Tests (8)
Forms\InputBaseTest.cs (5)
301
Assert.Empty(rootComponent.EditContext.
GetValidationMessages
(fieldIdentifier));
326
Assert.Equal(new[] { "Bad date value" }, rootComponent.EditContext.
GetValidationMessages
(fieldIdentifier));
336
Assert.Empty(rootComponent.EditContext.
GetValidationMessages
(fieldIdentifier));
355
Assert.Equal(new[] { "Bad date value" }, rootComponent.EditContext.
GetValidationMessages
(fieldIdentifier));
361
Assert.Empty(rootComponent.EditContext.
GetValidationMessages
(fieldIdentifier));
Forms\InputDateTest.cs (1)
29
var validationMessages = rootComponent.EditContext.
GetValidationMessages
(fieldIdentifier);
Forms\InputNumberTest.cs (1)
44
var validationMessages = rootComponent.EditContext.
GetValidationMessages
(fieldIdentifier);
Forms\InputSelectTest.cs (1)
187
var validationMessages = rootComponent.EditContext.
GetValidationMessages
(fieldIdentifier);