Skip to content

weitzhandler/Prism.Validation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prism.Validation

The Prism.Validation is based on Prism. It allows you to use Validations based on the ValidationAttributes in your Model, ViewModel and so on. Because most of you want to share your code acroos the .NET application model (also known as App models) the Prism.Validation is shipped as PCL.

##Install Install with nuget Install-Package Prism.Validation

##Use

  1. Use in your PCL Profile Profile7 (Set in your .csproj<TargetFrameworkProfile>Profile7</TargetFrameworkProfile>)
  2. Install Prism.Validation in your project with nuget Install-Package Prism.Validation
  3. Create your model class and inherit from ValidatableBindableBase.
  4. Decorate your properties with DataAnnotations like [StringLength(2, ErrorMessage = "Max 2 digits")]
  5. Set Binding in XAML like <TextBox Text="{Binding Name,Mode=TwoWay,ValidatesOnDataErrors=True,UpdateSourceTrigger=PropertyChanged}" />

##Validation Model classes are a good example which can be used to share across different platforms. Also you may want to add some basic validations into the model with DataAnnotaions.

The Prism Core Libary doesn't provide a validation implementation (Related Issue on Prism), so the Prism.Validation libary is filling this gap. The validation was taken over from the UWP ValidatableBindableBase with litte adjustments.

With the Prism.Validation you could share your model with DataAnnotaion between wpf, xamarin and uwp.

##Changelog

###1.1.0.0

###1.0.0.0

##Contribute Contribute if you want.

About

Provides PCL Validation for Prism

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%