C# Class RequiredAttribute, i18N-Complete

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

Specifies that a data field value is required.

Inheritance: System.ComponentModel.DataAnnotations.RequiredAttribute
Afficher le fichier Open project: adaptabi/i18N-Complete Class Usage Examples

Méthodes publiques

Méthode Description
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.

Method Details

FormatErrorMessage() public méthode

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.
Résultat string

RequiredAttribute() public méthode

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
Résultat System

RequiredAttribute() public méthode

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.
Résultat System