ClientValidationProvider.RenderClientValidationRules 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳 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當沒有需要渲染的內容時。