WisDom. Net-Verification Framework
1. CategoryHere we divide data verification into the following types:
- Data Type verification is mainly used to ensure that the data type input is correct, for example, the input age is A year old, obviously illegal
- The domain check is mainly used to verify whether the input data is in the value range. For example, if you enter 400 for an age item, it is obviously invalid.
- The format check is mainly used to check whether the data format is correct. For example, the Email input Ca is obviously invalid.
- Custom check and custom validation data. For example, check whether the data format is legal.
2. Introduction
As a standard building, it is implemented based on the Attribute of the class attributes (here only the length verification is implemented, and others are to be extended)
3. Call Method
public class Demo { [MaxLength(5)] public string MaxName { get; set; } }