/WinRTXamlValidation

WinRT XAML Validation

Primary LanguageC#

WinRT XAML Validation

”WinRT XAML Validation” is a library to enable comprehensive validation of user input in C#/XAML WinRT apps. The implemented validation approach is based on Data Annotations and the ValidationAttribute class and extends those principles for implicit and explicit synchronous and asynchronous validation of properties and entities as a whole.

WinRT XAML Validation is forked from https://winrtxamlvalidation.codeplex.com/ and ported to portable class libraries (Profile 7).

The XAML controls available in the original WinRT XAML Validation library as still present - only the validation attributes, ValidationBindableBase class and related classes are moved to a PCL.

Documentation

Please see: https://winrtxamlvalidation.codeplex.com/documentation

How portable is this?

(From: http://stackoverflow.com/a/24251137, I've also verified this myself)

System.ComponentModel.DataAnnotations is supported in certain PCL profiles.

Supported profiles:

  • .NET 4.0.3 and up
  • Windows Store 8 and up
  • Silverlight 4 and up

Most notably, the latest Windows Phone is not supported (8.1 at the time).

See full PCL feature table at:

http://msdn.microsoft.com/en-us/library/gg597391%28v=vs.110%29.aspx

However, the part that is more useful might be the XAML control (ValidationPanel and ValidationSummary).