Built-in Data Validation
The Traditional Approach
You need to translate business rules into validation code that can be scattered across a project or you'll need to invest the time to create a unified infrastructure with reusable validation rules.
Data validation is usually executed against business rules. Converting this code between a Windows and a Web app is not simple. There are standard and third-party components (like the DevExpress Validation Provider) that help with this task.
The XAF Advantage
A powerful platform-agnostic validation engine with numerous predefined validation rules that can be combined and customized at runtime to address a wide-range of business scenarios.
XAF provides an elegant solution to determine whether end-user data manipulations satisfy predefined rules. The mechanism is platform-agnostic and is seamlessly integrated within many parts of the application without dependencies on the UI. Predefined validation rules cover multiple use-case scenarios. For utmost flexibility, you can create custom rules to fit any business requirement. All of this extends productivity because you can leverage a single declarative approach which is abstracted from platform complexities.
Validation - How it Works
As you know, end-user data entry errors are common and it's the developer's responsibility to prevent associated issues. XAF includes a powerful and flexible validation engine and a large number of readily usable validation rules. The system is dynamic, so you can extend it with your own rule definitions whenever necessary.
Data validation is not a clearly defined status, so XAF uses a system of context based checks. Validity checking can either be triggered by the user manually or performed by the framework automatically at specified points. Again, this is extensible, so you can implement your own business logic in validator classes and your own (business) processes can leverage the functionality at any point in time.
Like the rest of XAF, data validation is independent from the user interface. Once defined, your business rules will always be adhered to, whether you're targeting a WinForms or ASP.NET frontend, or whether you are checking these rules in a UI independent data import process.