IT:AD:Design:Investigations:Rules:Validation
Summary
Validation is a subset of the concept of applying Rules.
Notes
- InputModel Validation types are:
- Required:
- Type: (int, string, bool)
- Options/Range: (0-100, 0-1.00, [Male|Female])
- Format: Regex pattern.
- Conditional upon the values of other values in the InputModel.
* InputModel Validation is applied to InputModels as close as feasible to the Client in order to not require more expensive Application Services.
Methods to validation InputModels
- Validation by Attributes:
- Notes:
- As seen in ASP.MVC
- Advantages:
- Near the Object Property being validated.
- Considerations:
- Disadvantages:
- Debugging is more obscure as Exception is raised from a ValidatorService.
- Validation by OBjectValidator
- Notes:
- eg: StudentValidator validating StudentValidator
- Advantages: