Class BuilderResults
The outcome of building a view or template: what was built, and every problem found.
public class BuilderResults
- Inheritance
-
BuilderResults
- Inherited Members
Properties
Context
The context the model was validated in. Its display name prefixes each error's member name.
public ValidationContext Context { get; }
Property Value
FlattenedResults
The errors with composite results expanded into one entry each, and each member name prefixed with Context's display name.
public ICollection<ValidationResult> FlattenedResults { get; }
Property Value
IsSuccessful
Whether the model passed validation with no errors.
public bool IsSuccessful { get; }
Property Value
ValidationResults
The validation errors found on the model. Empty when there were none.
public ICollection<ValidationResult> ValidationResults { get; }
Property Value
Methods
Validate<TModel>(TModel)
Validates every property of model against its validation attributes, and
returns the errors found.
public static BuilderResults Validate<TModel>(TModel model)
Parameters
modelTModel
Returns
Type Parameters
TModel