31 references to Add
Microsoft.AspNetCore.Components.Forms (4)
EditContextDataAnnotationsExtensions.cs (3)
100
_messages.
Add
(fieldIdentifier, result.ErrorMessage!);
129
_messages.
Add
(_editContext.Field(memberName), validationResult.ErrorMessage!);
134
_messages.
Add
(new FieldIdentifier(_editContext.Model, fieldName: string.Empty), validationResult.ErrorMessage!);
ValidationMessageStore.cs (1)
39
=>
Add
(FieldIdentifier.Create(accessor), message);
Microsoft.AspNetCore.Components.Forms.Tests (19)
EditContextTest.cs (11)
134
store1.
Add
(field, "Store 1 message 1");
135
store1.
Add
(field, "Store 1 message 2");
136
store1.
Add
(new FieldIdentifier(new object(), "otherfield"), "Message for other field that should not appear in results");
137
store2.
Add
(field, "Store 2 message 1");
164
store1.
Add
(field1, "Store 1 field 1 message 1");
165
store1.
Add
(field1, "Store 1 field 1 message 2");
166
store1.
Add
(field2, "Store 1 field 2 message 1");
167
store2.
Add
(field1, "Store 2 field 1 message 1");
202
messages.
Add
(
223
messages.
Add
(
244
messages.
Add
(
ValidationMessageStoreTest.cs (8)
31
messages.
Add
(field1, "Field 1 message 1");
32
messages.
Add
(field1, "Field 1 message 2");
33
messages.
Add
(field2, "Field 2 message 1");
63
messages.
Add
(field1, "Field 1 message 1");
64
messages.
Add
(field1, "Field 1 message 2");
65
messages.
Add
(field2, "Field 2 message 1");
82
messages.
Add
(field1, "Field 1 message 1");
83
messages.
Add
(field2, "Field 2 message 1");
Microsoft.AspNetCore.Components.Web (2)
Forms\InputBase.cs (1)
140
_parsingValidationMessages.
Add
(FieldIdentifier, validationErrorMessage);
Forms\Mapping\EditContextFormMappingExtensions.cs (1)
73
_messages.
Add
(fieldIdentifier, errorMessage.ToString(CultureInfo.CurrentCulture));
Microsoft.AspNetCore.Components.Web.Tests (6)
Forms\InputBaseTest.cs (6)
221
messages.
Add
(fieldIdentifier, "I do not like this value");
389
messageStore.
Add
(fieldIdentifier, "Some message");
419
messageStore.
Add
(fieldIdentifier, "Some message");
441
messageStore.
Add
(fieldIdentifier, "Test error message");
476
messageStore.
Add
(fieldIdentifier, "Test error message");
506
messageStore.
Add
(fieldIdentifier, "Artificial error message");