wisdom.net-Validation Framework
1. Classification Here we divide data validation into the following types of
- Data type validation is primarily used to ensure that data type input is correct such as age an entry a-year-old, apparently illegal
- The domain check is primarily used to verify that the input data is in a range of values such as entering 400 in age one, which is obviously illegal.
- The format check is primarily used to check that the data is in the correct format, such as an email input CA, which is obviously illegal.
- Custom check, custom checksum data. such as verifying that the data format is legitimate, etc.
2. Introduction
Built as a standard, based on the attribute of the class's attributes (this only implements the length verification, the others are yet to be expanded)
3. Calling methods
Public class Demo { [MaxLength (5)] publicstringgetset ; } }