共用方式為


ModelBindingMessageProvider.ValueMustBeANumberAccessor 屬性

定義

錯誤訊息 HTML 和標籤協助程式會針對數值格式的用戶端驗證新增。 例如,) 屬性的欄位 float 沒有正確格式化的值,則會在瀏覽器中顯示 (。

public:
 property Func<System::String ^, System::String ^> ^ ValueMustBeANumberAccessor { Func<System::String ^, System::String ^> ^ get(); void set(Func<System::String ^, System::String ^> ^ value); };
public:
 virtual property Func<System::String ^, System::String ^> ^ ValueMustBeANumberAccessor { Func<System::String ^, System::String ^> ^ get(); };
public Func<string,string> ValueMustBeANumberAccessor { get; set; }
public virtual Func<string,string> ValueMustBeANumberAccessor { get; }
member this.ValueMustBeANumberAccessor : Func<string, string> with get, set
member this.ValueMustBeANumberAccessor : Func<string, string>
Public Property ValueMustBeANumberAccessor As Func(Of String, String)
Public Overridable ReadOnly Property ValueMustBeANumberAccessor As Func(Of String, String)

屬性值

預設值 String 為 「欄位 {0} 必須是數位」。

適用於