This is Adish876's Typepad Profile.
Join Typepad and start following Adish876's activity
Join Now!
Already a member? Sign In
Recent Activity
I had a problem with this validation provider when using Entity Framework Code First objects as MVC models. The problem was that in actions such as Create, the navigational properties for associated objects were null (as in Vehicle -> Driver; Driver was null when creating a Vehicle). The problem was that the provider examined every property and returned validation errors on such properties. I modified the code to only validate the model and not the properties, like this: public class EnterpriseLibraryValidationProvider : ModelValidatorProvider { public override IEnumerable<ModelValidator> GetValidators( ModelMetadata metadata, ControllerContext context) { if (metadata.ContainerType == null || String.IsNullOrEmpty(metadata.PropertyName)) { var validatorFactory = IocContainer.Instance.Unity.Resolve<ValidatorFactory>(); Validator validator = validatorFactory.CreateValidator(metadata.ModelType); if (validator != null) return new[] { new EnterpriseLibraryValidationWrapper(metadata, context, validator) }; } return Enumerable.Empty<ModelValidator>(); } }
1 reply
Mikekelly85 is right, you should have mentioned HTTP Digest.
Toggle Commented Nov 14, 2010 on Breaking the Web's Cookie Jar at Coding Horror
Adish876 is now following The Typepad Team
Nov 14, 2010