語言

ClientValidationProvider.RenderClientValidationRules 方法

定義

回傳 a RenderFragment ,該規則會呈現表單渲染欄位的客戶端驗證規則,或 null 當沒有用戶端驗證資料適用(例如伺服器端沒有渲染欄位被驗證時)。

public abstract Microsoft.AspNetCore.Components.RenderFragment? RenderClientValidationRules(Microsoft.AspNetCore.Components.Forms.EditContext editContext, System.Collections.Generic.IReadOnlyDictionary<Microsoft.AspNetCore.Components.Forms.FieldIdentifier,string> renderedFields);
abstract member RenderClientValidationRules : Microsoft.AspNetCore.Components.Forms.EditContext * System.Collections.Generic.IReadOnlyDictionary<Microsoft.AspNetCore.Components.Forms.FieldIdentifier, string> -> Microsoft.AspNetCore.Components.RenderFragment
Public MustOverride Function RenderClientValidationRules (editContext As EditContext, renderedFields As IReadOnlyDictionary(Of FieldIdentifier, String)) As RenderFragment

參數

editContext
EditContext

呈現 EditContext 的形態。

renderedFields
IReadOnlyDictionary<FieldIdentifier,String>

輸入所渲染的欄位,以 鍵值為 FieldIdentifier ,並以渲染出來的 HTML name 作為值。 實作只為這些領域建立客戶端規則。

傳回

RenderFragment A會發出規則標記,或null當沒有需要渲染的內容時。

適用於