FubuValidation is a member of the Fubu-family of frameworks -- frameworks that aim to get out of your way by providing rich semantic models with powerful convention-driven operations. It aims to provide a convention-driven approach to validation while supporting more traditional approaches when needed.
An important thing to note: FubuValidation is NOT coupled to FubuMVC. In fact, it maintains no references to the project.
FubuMVC.Validation is a package that adapts FubuValidation to the FubuMVC framework and provides out-of-to-the-box support for many common validation scenarios (both ajax and non-ajax).
You can clone our repo and build from scratch, or you can use our NuGet packages:
- FubuValidation - The core validation framework
- FubuMVC.Validation - FubuMVC specific uses for FubuValidation
By default, FubuMVC.Validation will be automatically be applied once it is installed. The default policy is to make any chains matching the following criteria validated:
- Any route that responds to an HTTP POST
- Any chain that returns an AjaxContinuation
The Fubu-family of frameworks are built by Windows users, so all of the text files have CRLF line endings. These line endings are stored as-is in git (which means we all have autocrlf turned off). If you have autocrlf enabled, when you retrieve files from git, it will modify all of your files. Your best bet is to turn off autocrlf, and re-create your clone of FubuMVC.
- Delete your local clone of the repository
git config --global core.autocrlf false
git config --system core.autocrlf false
- Clone the repository again
CommonAssemblyInfo.cs is generated by the build. The build script requires Ruby with rake installed.
InstallGems.batto get the ruby dependencies (only needs to be run once per computer)
- open a command prompt to the root folder and type
raketo execute rakefile.rb
If you do not have ruby:
You need to manually create a src\CommonAssemblyInfo.cs file
echo // > src\CommonAssemblyInfo.cs
- open src\FubuValidation.sln with Visual Studio and Build the solution
- If you do not have Ruby installed, get the latest version and install it. For Windows, you can find it at RubyInstaller
- After Ruby is installed, in the root directory, run
- If that succeeds, in the root directory, run
- If prompted, run
git submodule update --initto populate your buildsupport folder.
- Rerun rake
- If prompted, run
- At this point, the project should have all NuGet packages pulled down, been built and tested.
You are now ready to launch FubuValidation.sln