Click here to Skip to main content
15,885,767 members
Articles / Desktop Programming / WPF

A framework for comprehensive validation of user input

Rate me:
Please Sign up or sign in to vote.
4.70/5 (8 votes)
19 Jun 2012CPOL28 min read 31.2K   523   18  
Validation of input made as easy as possible for Windows.Forms, WPF, console-applications or any other purposes
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
    <ProductVersion>8.0.30703</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{1902F9D3-DAA1-486B-92A3-30E113FA6460}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>ValidatorTests</RootNamespace>
    <AssemblyName>ValidatorTests</AssemblyName>
    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
    <TargetFrameworkProfile>Client</TargetFrameworkProfile>
    <FileAlignment>512</FileAlignment>
    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
    <PlatformTarget>x86</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
    <PlatformTarget>x86</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Xml" />
    <Reference Include="Microsoft.CSharp" />
    <Reference Include="System.Core" />
    <Reference Include="System.Xml.Linq" />
    <Reference Include="System.Data.DataSetExtensions" />
    <Reference Include="System.Xaml">
      <RequiredTargetFramework>4.0</RequiredTargetFramework>
    </Reference>
    <Reference Include="WindowsBase" />
    <Reference Include="PresentationCore" />
    <Reference Include="PresentationFramework" />
  </ItemGroup>
  <ItemGroup>
    <ApplicationDefinition Include="App.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </ApplicationDefinition>
    <Compile Include="ViewModels\CompareValidatorViewModel.cs" />
    <Compile Include="ViewModels\DateTimeValidatorViewModel.cs" />
    <Compile Include="ViewModels\FilterValidatorViewModel.cs" />
    <Compile Include="ViewModels\IViewModelMessageProvider.cs" />
    <Compile Include="ViewModels\ListValidatorViewModel.cs" />
    <Compile Include="ViewModels\NumberValidatorViewModel.cs" />
    <Compile Include="ViewModels\PxPicValidatorViewModel.cs" />
    <Compile Include="ViewModels\RegExValidatorViewModel.cs" />
    <Compile Include="ViewModels\TextViewModel.cs" />
    <Compile Include="ViewModels\MainWindowViewModel.cs" />
    <Compile Include="ViewModels\ValidatorViewModel.cs" />
    <Compile Include="ViewModels\ValidatorViewModelBase.cs" />
    <Compile Include="ViewModels\ViewModelBase.cs" />
    <Compile Include="ViewModels\ViewModelCommand.cs" />
    <Compile Include="Views\CompareValidatorView.xaml.cs">
      <DependentUpon>CompareValidatorView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\DateTimeValidatorView.xaml.cs">
      <DependentUpon>DateTimeValidatorView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\FilterValidatorView.xaml.cs">
      <DependentUpon>FilterValidatorView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\LinkOptionsView.xaml.cs">
      <DependentUpon>LinkOptionsView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\ListValidatorView.xaml.cs">
      <DependentUpon>ListValidatorView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\NumberValidatorView.xaml.cs">
      <DependentUpon>NumberValidatorView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\PxPicValidatorView.xaml.cs">
      <DependentUpon>PxPicValidatorView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\RegExValidatorView.xaml.cs">
      <DependentUpon>RegExValidatorView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\ValidationCommandView.xaml.cs">
      <DependentUpon>ValidationCommandView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\ValidatorInputView.xaml.cs">
      <DependentUpon>ValidatorInputView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\ValidatorOptionsView.xaml.cs">
      <DependentUpon>ValidatorOptionsView.xaml</DependentUpon>
    </Compile>
    <Compile Include="Views\ValidatorView.xaml.cs">
      <DependentUpon>ValidatorView.xaml</DependentUpon>
    </Compile>
    <Page Include="MainWindow.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Compile Include="App.xaml.cs">
      <DependentUpon>App.xaml</DependentUpon>
      <SubType>Code</SubType>
    </Compile>
    <Compile Include="MainWindow.xaml.cs">
      <DependentUpon>MainWindow.xaml</DependentUpon>
      <SubType>Code</SubType>
    </Compile>
    <Page Include="Views\CompareValidatorView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\DateTimeValidatorView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\FilterValidatorView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\LinkOptionsView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\ListValidatorView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\NumberValidatorView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\PxPicValidatorView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\RegExValidatorView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\ValidationCommandView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\ValidatorInputView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\ValidatorOptionsView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Views\ValidatorView.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Properties\AssemblyInfo.cs">
      <SubType>Code</SubType>
    </Compile>
    <Compile Include="Properties\Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DesignTime>True</DesignTime>
      <DependentUpon>Resources.resx</DependentUpon>
    </Compile>
    <EmbeddedResource Include="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
    </EmbeddedResource>
    <AppDesigner Include="Properties\" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\..\Assemblies\Ganzer.Wpf\Ganzer.Wpf.csproj">
      <Project>{F58095CB-50AA-4E45-900E-7E9FCD87A323}</Project>
      <Name>Ganzer.Wpf</Name>
    </ProjectReference>
    <ProjectReference Include="..\..\Assemblies\Ganzer\Ganzer.csproj">
      <Project>{EA38A17F-AAFA-4918-910D-173F745EAE0A}</Project>
      <Name>Ganzer</Name>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup />
  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Germany Germany
I am a software developer since many years and have worked on several large projects especially in financial sectors and the logistics industry.

My favorite programming languages are C, C++ und newly C#.

I am the architect and chief developer of Tricentis TDM Studio (former Q-up) - a generator that primarily creates template based synthetic data for software testing.

Comments and Discussions