Questions tagged [validation-application-bl]

The Enterprise Library Validation Application Block provides a library of classes, called validators, that supplies the code for validating .NET Framework data types. For example, one validator checks for null strings and another validator checks that a number falls within a specified range.

48 questions
7
votes
2 answers

Which validation framework to choose: Spring Validation or Validation Application Block (Enterprise LIbrary 4.0)?

I am trying to choose one of the validation frameworks for a major application, and while both options seem enticing, I was wondering whether there are any specific pros and cons I should be aware of before committing to one or the other.
mr.sverrir
  • 414
  • 4
  • 12
7
votes
1 answer

"Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Validation" exception

I am currently getting the following exception while trying to use the Enterprise Library Validation Application Block: An error occurred creating the configuration section handler for validation: Could not load file or assembly…
Chris
  • 219
  • 1
  • 4
  • 12
6
votes
1 answer

Using Unity Framework & Validation Application Block to Validate Method Parameters

Question Is it posible to have the Validation.Validate() method of the Validation Application Block see each parameter of the IParameterCollection supplied by Unity as my custom UserModel? Background: I am attempting to use both Unity and the…
5
votes
1 answer

Enterprise Library Validation Application Block and Internationalization

Scenario A .NET/WPF desktop application should be localized (or in MS terms globalized) to a different language than English. That is, the UI needs to be adopted completely (labels, icons, ...). Log file entries, audit trail entries, and other…
4
votes
3 answers

Where/when should i validate my data when using EF and POCOs?

I started a project to see what EF 4 can do with POCOs. I created a db and a custom POCO. Now i want to validate my data. For this i'm using the Enterprise Library Validation Block 5. I have no problem including the validation in my POCOs through…
4
votes
3 answers

C# Model Validation - Validation Application Block or DataAnnotations?

I want to add validator attributes to my domain models (in an ASP.NET MVC app), and I'm trying to decide between 2 frameworks, the Validation Application Block and DataAnnotations. They appears to do similar tasks, so I want to pick the one which…
JonoW
  • 14,029
  • 3
  • 33
  • 31
3
votes
3 answers

Validate password length using an attribute that also accepts empty?

I would like to validate password length on edit if password is entered otherwise empty should be considered ok. I have seen suggestions to skip the attribute for the password in the edit model and do the validation in the code, but I want to use…
Carl R
  • 8,104
  • 5
  • 48
  • 80
3
votes
2 answers

Metadatatypes with self-validation using validation application block

Is it possible to use the selfvalidation attribute with my validations located in a metadatatype? I'm using Enterprise Library 5's Validation Application Block.
3
votes
2 answers

.Net Object validation

Can I use Validation Application Block, for a high performance program? I mean when I'm getting objects from a stream and I need to validate their values as I parse data coming. As I understand reflection is involved... Is there any alternative…
3
votes
2 answers

Why should I use PropertyProxyValidator? ASP.NET

I understand thatthe PropertyProxyValidator integrates with the ASP.NET UI. But, it cannot do client side validation. How would it be any different from throwing in a label in the UI and populating the errors on the server side? Also, If I am using…
Nick
  • 7,475
  • 18
  • 77
  • 128
3
votes
1 answer

EntLib Custom Validation Provider Example

I have already tried to build a Custom Validation Provider to use with EntLib. 6 Configuration Console in Full-Integration Mode. I followed this MSDN article: Creating a Custom Provider. All available examples I have seen provide basic integration…
Kamran
  • 782
  • 10
  • 35
2
votes
1 answer

Can a validator be associated with more than one rule set?

Using the (MS) Enterprise Library, Validation Application Block (VAB), you can include attributes in your code to define rule sets. I have applied the attributes to the properties of a class and I have defined two rule sets (the properties fall into…
Captain Sensible
  • 4,946
  • 4
  • 36
  • 46
2
votes
2 answers

Can MVC UpdateModel use Enterprise Library VAB?

...or should I say, what's the cleanest way to use Enterprise Library 5 VAB with MVC? I currently use the form: ActionResult Save(int id, FormCollection form) { SomeModel model = somehowgetbyid(id); UpdateModel(model); …
Carl R
  • 8,104
  • 5
  • 48
  • 80
2
votes
2 answers

Enterprise library validation application block with inheritance

I'm using Enterprise library Validation application block. abstract Class A { public int fieldA; } class B:A { } I add validators to type B. I'm not able to find the field fieldA and also even if I enter it in configuration, the validation does…
2
votes
1 answer

wcf generated classes and validation application block attributes

I'm new to the validation application block and trying to use it with wcf... I have a wcf service that has data objects with validation rules defined with attributes, using the validation application block . On my client side (WPF), I have a service…
1
2 3 4