C# Класс SampleApplication.Models.Movie.PriceRangeAttribute

Vaildation attribute that verifies that the price is in the range given by the priceing service. Used to demonstrate injection of validation attributes.
Наследование: System.ComponentModel.DataAnnotations.ValidationAttribute
Показать файл Открыть проект

Private Properties

Свойство Тип Описание

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

Метод Описание
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.

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

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