C# 클래스 RequiredAttribute, i18N-Complete

i18N localized version of System.ComponentModel.DataAnnotations.RequiredAttribute class.

Specifies that a data field value is required.

상속: System.ComponentModel.DataAnnotations.RequiredAttribute
파일 보기 프로젝트 열기: adaptabi/i18N-Complete 1 사용 예제들

공개 메소드들

메소드 설명
FormatErrorMessage ( string name ) : string

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

RequiredAttribute ( ) : System

Initializes a new instance of the System.ComponentModel.DataAnnotations.RequiredAttribute class whose error message is localized.

ErrorMessage is set to:

The {0} field is required.

RequiredAttribute ( string errorMessage ) : System

Initializes a new instance of the System.ComponentModel.DataAnnotations.RequiredAttribute class whose error message is localized.

메소드 상세

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

RequiredAttribute() 공개 메소드

Initializes a new instance of the System.ComponentModel.DataAnnotations.RequiredAttribute class whose error message is localized.

ErrorMessage is set to:

The {0} field is required.

public RequiredAttribute ( ) : System
리턴 System

RequiredAttribute() 공개 메소드

Initializes a new instance of the System.ComponentModel.DataAnnotations.RequiredAttribute class whose error message is localized.
public RequiredAttribute ( string errorMessage ) : System
errorMessage string An error message to associate with a validation control if validation fails.
리턴 System