C# Класс System.ComponentModel.DataAnnotations.NumericAttribute

Наследование: System.ComponentModel.DataAnnotations.DataTypeAttribute
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
FormatErrorMessage ( string name ) : string

Applies formatting to an error message, based on the data field where the error occurred.

IsValid ( object value ) : bool

Determines whether the specified value of the object is valid.

NumericAttribute ( ) : System

Creates a new NumericAttribute instance with the defaul error message: "The {0} field is not a valid number."

NumericAttribute ( string errorMessage ) : System

Creates a new NumericAttribute instance

Описание методов

FormatErrorMessage() публичный Метод

Applies formatting to an error message, based on the data field where the error occurred.
public FormatErrorMessage ( string name ) : string
name string The name to include in the formatted message.
Результат string

IsValid() публичный Метод

Determines whether the specified value of the object is valid.
public IsValid ( object value ) : bool
value object The value of the object to validate.
Результат bool

NumericAttribute() публичный Метод

Creates a new NumericAttribute instance with the defaul error message: "The {0} field is not a valid number."
public NumericAttribute ( ) : System
Результат System

NumericAttribute() публичный Метод

Creates a new NumericAttribute instance
public NumericAttribute ( string errorMessage ) : System
errorMessage string
Результат System