You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,7 @@ Basic usage of the library includes a few steps:
113
113
- then, apply the [validator](#validator) to [object](#object) that must be validated;
114
114
- finally, check the results and print [report](#report) if applicable.
115
115
116
-
The library is suitable for both *post-validation* and *pre-validation*. *Post-validation* stands for validating the object that is already populated with the data. [*Pre-validation*](#single-member-adapter) stands for validating the data before writing it to the object. The same validator declaration can be used in both cases.
116
+
The library is suitable for both *post-validation* and *pre-validation*. *Post-validation* stands for validating the object that is already populated with the data. *Pre-validation* stands for validating the data before writing it to the object. The same validator declaration can be used in both cases.
117
117
118
118
# Definitions
119
119
@@ -150,6 +150,14 @@ Variable or value used as a validation sample in [operator](#operator).
150
150
##### *Operator*
151
151
Atomic validation condition.
152
152
153
+
##### *Post-validation*
154
+
155
+
Validating the object that is already populated with the data.
156
+
157
+
##### *Pre-validation*
158
+
159
+
Validating the data before writing it to the object.
160
+
153
161
##### *Property*
154
162
Method or member variable of C++ class or structure that must be validated, see [Properties](#properties).
155
163
@@ -1500,7 +1508,7 @@ There are three built-in adapter types implemented in `cpp-validator` library:
1500
1508
1501
1509
### Single member adapter
1502
1510
1503
-
*Single member adapter* validates only a single member. This adapter is best suitable for *pre-validation*, i.e. validating the data before updating an object in the object's setters. *Single member adapter* is constructed by calling `make_single_member_adapter()` helper that can have one of the following signatures:
1511
+
*Single member adapter* validates only a single member. This adapter is best suitable for [pre-validation](#pre-validation). *Single member adapter* is constructed by calling `make_single_member_adapter()` helper that can have one of the following signatures:
1504
1512
-`make_single_member_adapter(member_path,val,reporter)` where
1505
1513
-`member_path` is a [member](#member) specified in [member notation](#member-notation);
0 commit comments