.NET - AspectV - .NET Data Validation - CodeCanyon
AspectV .NET Data Validation his title this type of .NET/Miscellaneous This time I will review,made by AvantPrime, .NET/Miscellaneous is sold at a price of $8 in CodeCanyon.ASP NET Validation // ComponentModel.DataAnnotations // Custom Validation // Custom Validator // Data Annotations // Deep Validation // MVC Validation // Model Validation // NET Validation // Object Validation // Shallow Validation // ValidateAttribute // data validation // validation // validator //
Created | 20 March 13 |
Last Update | 13 June 13 |
Compatible Browsers | IE6, IE7, IE8, IE9, IE10, Firefox, Safari, Opera, Chrome |
Software Version | .NET 3.5, .NET 3.7, .NET 4.0, .NET 4.5 |
Files Included | C# CS |
This component builds on top of the regular .NET validation framework and addresses concerns that are not normally at the forefront of the average developer – stability and security.
- Security beyond UI validation. Ensuring that comprehensive model validation can be performed on all layers within your application. The business layer, domain model and even service layers are ideal places for validation with calls coming from many different clients.
- Deep object graph validation is another major highlight for this component. Instead of simple validating only the immediate properties of the object under inspection, this component will validate to depth (n) or the entire object graph. This ensures that not only your top level object is valid, but the entire object graph is valid according to the decorated requirements of the Validation Attributes.
- Validate using any attribute that inherits ValidationAttribute therefore your custom validation attributes will always work.
Benefits of the Data Annotations Validator
- Validation in all your .NET application including WebForms, MVC, WCF, etc
- Validate objects in your business layer
- Ease application maintenance and create predicatable results
- Future proof quality checking in your application allowing for newer attributes to automatically take effect
- Ensures that your application is being built correctly (guiding light)
- Stop the problems before they start, always ensuring that the your data is valid
What do you get when you buy?
- .NET Assembly with Strong Name Signature
- Debug file (PDB)
- XML comments (Intellisense)
- Console application Demo Project
- A comprehensive help file documenting full usage
- API Documentation
- C# Source Code
- Visual Studio 2010 SP1 & 2012 Solution
- Support
Technologies
This component is built using the .NET 3.5 Framework which means in can be used in all .NET applications that are using the 3.5 framework or newer. This includes .NET 3.5, 4.0, & 4.5+.
You can immediately use this within your application and is very simple. Ask any questions or suggest features at support.avantprime.com!
How would I use this component?
Example of how to use the Validator, decorating your properties with validation attributes to ensure that they meet your requirements and then enforcing these rules by calling the Validate operation.
using System; using System.ComponentModel.DataAnnotations; namespace Demo.TestConsole { class Program { static void Main(string[] args) { var application = new Application { Applicant = new Person { Email = "john.connor@trmt.com", FirstName = "John (Use a lot of words to cause validation failure)", LastName = null }, Address = new Address { StreetName = "123 CodeVille Terrace", City = "Sea Sharp" }, PaymentDetails = new Payment { CreditCardNumber = "4111111111111110" } }; Console.WriteLine(AvantPrime.AspectV.Validator.Validate(application) ? "Awesome! Validation Success." : "Something awful has happened. Validation Failed."); Console.WriteLine(); Console.WriteLine("Press any key to exit..."); Console.ReadKey(); } } public class Application { [Required] public Person Applicant { get; set; } [Required] public Address Address { get; set; } public Payment PaymentDetails { get; set; } } public class Person { [EmailAddress] [Required] public string Email { get; set; } [StringLength(15)] public string FirstName { get; set; } [StringLength(15)] public string LastName { get; set; } } public class Address { [Required] public string StreetName { get; set; } public string Locality { get; set; } public string City { get; set; } public string County { get; set; } [Required] public string PostCode { get; set; } [Required] public string Country { get; set; } } public class Payment { [CreditCard] public string CreditCardNumber { get; set; } } }
No comments:
Post a Comment