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

Наследование: 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.

YearAttribute ( ) : System

Creates a new instance of YearAttribute

YearAttribute ( string errorMessage ) : System

Creates a new instance of YearAttribute

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

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

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

Creates a new instance of YearAttribute
public YearAttribute ( ) : System
Результат System

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

Creates a new instance of YearAttribute
public YearAttribute ( string errorMessage ) : System
errorMessage string Specify a custom error message to be translated
Результат System