C# Class FluentValidation.AspNetCore.ValidationResultExtension

Afficher le fichier Open project: JeremySkinner/FluentValidation

Méthodes publiques

Méthode Description
AddToModelState ( this result, ModelStateDictionary modelState, string prefix ) : void

Stores the errors in a ValidationResult object to the specified modelstate dictionary.

Method Details

AddToModelState() public static méthode

Stores the errors in a ValidationResult object to the specified modelstate dictionary.
public static AddToModelState ( this result, ModelStateDictionary modelState, string prefix ) : void
result this The validation result to store
modelState ModelStateDictionary The ModelStateDictionary to store the errors in.
prefix string An optional prefix. If ommitted, the property names will be the keys. If specified, the prefix will be concatenatd to the property name with a period. Eg "user.Name"
Résultat void