3 types derived from ModelValidator
System.Web (3)
ModelBinding\DataAnnotationsModelValidator.cs (1)
10
public class DataAnnotationsModelValidator :
ModelValidator
{
ModelBinding\ModelValidator.cs (1)
41
private class CompositeModelValidator :
ModelValidator
{
ModelBinding\ValidatableObjectAdapter.cs (1)
8
public class ValidatableObjectAdapter :
ModelValidator
{
29 references to ModelValidator
System.Web (29)
ModelBinding\AssociatedValidatorProvider.cs (4)
13
public override sealed IEnumerable<
ModelValidator
> GetValidators(ModelMetadata metadata, ModelBindingExecutionContext context) {
28
protected abstract IEnumerable<
ModelValidator
> GetValidators(ModelMetadata metadata, ModelBindingExecutionContext context, IEnumerable<Attribute> attributes);
30
private IEnumerable<
ModelValidator
> GetValidatorsForProperty(ModelMetadata metadata, ModelBindingExecutionContext context) {
45
private IEnumerable<
ModelValidator
> GetValidatorsForType(ModelMetadata metadata, ModelBindingExecutionContext context) {
ModelBinding\DataAnnotationsModelValidator.cs (1)
52
internal static
ModelValidator
Create(ModelMetadata metadata, ModelBindingExecutionContext context, ValidationAttribute attribute) {
ModelBinding\DataAnnotationsModelValidatorProvider.cs (15)
13
public delegate
ModelValidator
DataAnnotationsModelValidationFactory(ModelMetadata metadata, ModelBindingExecutionContext context, ValidationAttribute attribute);
16
public delegate
ModelValidator
DataAnnotationsValidatableObjectAdapterFactory(ModelMetadata metadata, ModelBindingExecutionContext context);
79
protected override IEnumerable<
ModelValidator
> GetValidators(ModelMetadata metadata, ModelBindingExecutionContext context, IEnumerable<Attribute> attributes) {
83
List<
ModelValidator
> results = new List<
ModelValidator
>();
128
AttributeFactories[attributeType] = (metadata, context, attribute) => (
ModelValidator
)constructor.Invoke(new object[] { metadata, context, attribute });
155
DefaultAttributeFactory = (metadata, context, attribute) => (
ModelValidator
)constructor.Invoke(new object[] { metadata, context, attribute });
189
if (!typeof(
ModelValidator
).IsAssignableFrom(adapterType)) {
195
typeof(
ModelValidator
).FullName
231
/// <see cref="
ModelValidator
"/> and it must contain a public constructor
243
ValidatableFactories[modelType] = (metadata, context) => (
ModelValidator
)constructor.Invoke(new object[] { metadata, context });
273
/// <see cref="
ModelValidator
"/> and it must contain a public constructor
281
DefaultValidatableFactory = (metadata, context) => (
ModelValidator
)constructor.Invoke(new object[] { metadata, context });
318
if (!typeof(
ModelValidator
).IsAssignableFrom(adapterType)) {
324
typeof(
ModelValidator
).FullName
ModelBinding\ModelMetadata.cs (1)
408
public virtual IEnumerable<
ModelValidator
> GetValidators(ModelBindingExecutionContext context) {
ModelBinding\ModelValidationNode.cs (2)
148
foreach (
ModelValidator
propertyValidator in propertyMetadata.GetValidators(modelBindingExecutionContext)) {
165
foreach (
ModelValidator
validator in ModelMetadata.GetValidators(modelBindingExecutionContext)) {
ModelBinding\ModelValidator.cs (3)
35
public static
ModelValidator
GetModelValidator(ModelMetadata metadata, ModelBindingExecutionContext context) {
50
foreach (
ModelValidator
propertyValidator in propertyMetadata.GetValidators(ModelBindingExecutionContext)) {
62
foreach (
ModelValidator
typeValidator in Metadata.GetValidators(ModelBindingExecutionContext)) {
ModelBinding\ModelValidatorProvider.cs (1)
5
public abstract IEnumerable<
ModelValidator
> GetValidators(ModelMetadata metadata, ModelBindingExecutionContext context);
ModelBinding\ModelValidatorProviderCollection.cs (1)
30
public IEnumerable<
ModelValidator
> GetValidators(ModelMetadata metadata, ModelBindingExecutionContext context) {
ModelBinding\MutableObjectModelBinder.cs (1)
198
ModelValidator
requiredValidator = ModelValidatorProviders.Providers.GetValidators(propertyMetadata, modelBindingExecutionContext).Where(v => v.IsRequired).FirstOrDefault();