C# Class Shaml.Web.CommonValidator.MvcValidationAdapter

Afficher le fichier Open project: sztupy/shaml

Méthodes publiques

Méthode Description
TransferValidationMessagesTo ( ModelStateDictionary modelStateDictionary, IEnumerable validationResults ) : ModelStateDictionary
TransferValidationMessagesTo ( string keyBase, ModelStateDictionary modelStateDictionary, IEnumerable validationResults ) : ModelStateDictionary

This acts as a more "manual" alternative to moving validation errors to the ModelStateDictionary if you care to bypass the use of ValidatableModelBinder. This typically wouldn't be used in conjunction with ValidatableModelBinder but as an alternative to it.

Method Details

TransferValidationMessagesTo() public static méthode

public static TransferValidationMessagesTo ( ModelStateDictionary modelStateDictionary, IEnumerable validationResults ) : ModelStateDictionary
modelStateDictionary ModelStateDictionary
validationResults IEnumerable
Résultat ModelStateDictionary

TransferValidationMessagesTo() public static méthode

This acts as a more "manual" alternative to moving validation errors to the ModelStateDictionary if you care to bypass the use of ValidatableModelBinder. This typically wouldn't be used in conjunction with ValidatableModelBinder but as an alternative to it.
public static TransferValidationMessagesTo ( string keyBase, ModelStateDictionary modelStateDictionary, IEnumerable validationResults ) : ModelStateDictionary
keyBase string If supplied, will be used as the model state prefix /// instead of the class name
modelStateDictionary ModelStateDictionary
validationResults IEnumerable
Résultat ModelStateDictionary