Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
capdiem committed Aug 8, 2024
1 parent 5576c62 commit 549f7a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"enableValidation": "Enable form validation.",
"model": "Objects that require form validation.",
"readonly": "",
"value": "Whether the verification is successful."
"value": "Whether the verification is successful.",
"autoLabel": "Whether to automatically generate labels for form items.",
"validateOn": "Validation timing, options: input, blur, submit."
},
"events": {
"onInvalidSubmit": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"enableValidation": "开启表单校验",
"model": "需要表单校验的对象",
"readonly": "",
"value": "是否校验成功"
"value": "是否校验成功",
"validateOn": "校验时机,可选输入时验证、失去光标时验证和提交时验证",
"autoLabel": "是否自动添加标签"
},
"events": {
"onInvalidSubmit": "",
Expand Down
4 changes: 3 additions & 1 deletion src/Masa.Blazor/Components/Form/MForm.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ public partial class MForm : MasaComponentBase

[Parameter] public EventCallback OnInvalidSubmit { get; set; }

[Parameter] public ValidateOn ValidateOn { get; set; } = ValidateOn.Input;
[Parameter]
[MasaApiParameter(ReleasedOn = "v1.7.0")]
public ValidateOn ValidateOn { get; set; } = ValidateOn.Input;

internal ConcurrentDictionary<string, string> AutoLabelMap { get; } = new();

Expand Down

0 comments on commit 549f7a2

Please sign in to comment.