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} 必须是数字”。

适用于