You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -23,30 +23,110 @@ public class BootstrapBlazorDataAnnotationsValidator : ComponentBase
23
23
/// 获得/设置 当前编辑窗体上下文
24
24
/// </summary>
25
25
[CascadingParameter]
26
+
[NotNull]
26
27
privateValidateForm?ValidateForm{get;set;}
27
28
28
29
[Inject]
29
30
[NotNull]
30
31
privateIServiceProvider?Provider{get;set;}
31
32
33
+
[NotNull]
34
+
privateValidationMessageStore?_message=null;
35
+
32
36
/// <summary>
33
37
/// 初始化方法
34
38
/// </summary>
35
39
protectedoverridevoidOnInitialized()
36
40
{
37
41
if(ValidateForm==null)
38
42
{
39
-
thrownewInvalidOperationException($"{nameof(Components.BootstrapBlazorDataAnnotationsValidator)} requires a cascading "+
40
-
$"parameter of type {nameof(Components.ValidateForm)}. For example, you can use {nameof(Components.BootstrapBlazorDataAnnotationsValidator)} "+
41
-
$"inside an {nameof(Components.ValidateForm)}.");
43
+
thrownewInvalidOperationException($"{nameof(BootstrapBlazorDataAnnotationsValidator)} requires a cascading parameter of type {nameof(Components.ValidateForm)}. For example, you can use {nameof(BootstrapBlazorDataAnnotationsValidator)} inside an {nameof(Components.ValidateForm)}.");
0 commit comments