語言

DataAnnotationsValidator.DisableClientValidation 屬性

定義

取得或設定此表單是否抑制用戶端驗證規則。 當 false (預設)時,框架會在渲染後的 HTML 中包含表單模型的驗證規則,讓使用者錯誤能在不需往返伺服器的情況下即時回報。 當 true時,僅執行伺服器端驗證。

[Microsoft.AspNetCore.Components.Parameter]
public bool DisableClientValidation { get; set; }
[<Microsoft.AspNetCore.Components.Parameter>]
member this.DisableClientValidation : bool with get, set
Public Property DisableClientValidation As Boolean

屬性值

屬性

適用於