C# 클래스 StringLengthAttribute, i18N-Complete

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

공개 메소드들

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

Applies formatting to a specified error message.

StringLengthAttribute ( int maximumLength ) : System

Initializes a new instance of the System.ComponentModel.DataAnnotations.StringLengthAttribute class by using a specified maximum length whose error message is localized.

ErrorMessage is set to:

The {0} must be at least {2} characters long.

StringLengthAttribute ( int maximumLength, int minLength ) : System

Initializes a new instance of the System.ComponentModel.DataAnnotations.StringLengthAttribute class by using a specified maximum length whose error message is localized.

ErrorMessage is set to:

The {0} must be at least {2} characters long but no longer than {1} characters.

StringLengthAttribute ( string errorMessage, int maximumLength ) : System

Initializes a new instance of the System.ComponentModel.DataAnnotations.StringLengthAttribute class by using a specified maximum length whose error message is localized.

StringLengthAttribute ( string errorMessage, int maximumLength, int minLenght ) : System

Initializes a new instance of the System.ComponentModel.DataAnnotations.StringLengthAttribute class by using a specified maximum length whose error message is localized.

메소드 상세

FormatErrorMessage() 공개 메소드

Applies formatting to a specified error message.
public FormatErrorMessage ( string name ) : string
name string The name of the field that caused the validation failure.
리턴 string

StringLengthAttribute() 공개 메소드

Initializes a new instance of the System.ComponentModel.DataAnnotations.StringLengthAttribute class by using a specified maximum length whose error message is localized.

ErrorMessage is set to:

The {0} must be at least {2} characters long.

public StringLengthAttribute ( int maximumLength ) : System
maximumLength int The maximum length of a string.
리턴 System

StringLengthAttribute() 공개 메소드

Initializes a new instance of the System.ComponentModel.DataAnnotations.StringLengthAttribute class by using a specified maximum length whose error message is localized.

ErrorMessage is set to:

The {0} must be at least {2} characters long but no longer than {1} characters.

public StringLengthAttribute ( int maximumLength, int minLength ) : System
maximumLength int The maximum length of a string.
minLength int The minimum length of the string.
리턴 System

StringLengthAttribute() 공개 메소드

Initializes a new instance of the System.ComponentModel.DataAnnotations.StringLengthAttribute class by using a specified maximum length whose error message is localized.
public StringLengthAttribute ( string errorMessage, int maximumLength ) : System
errorMessage string An error message to associate with a validation control if validation fails.
maximumLength int The maximum length of a string.
리턴 System

StringLengthAttribute() 공개 메소드

Initializes a new instance of the System.ComponentModel.DataAnnotations.StringLengthAttribute class by using a specified maximum length whose error message is localized.
public StringLengthAttribute ( string errorMessage, int maximumLength, int minLenght ) : System
errorMessage string An error message to associate with a validation control if validation fails.
maximumLength int The maximum length of a string.
minLenght int The minimum length of a string.
리턴 System