Skip to content

Commit 4694f38

Browse files
committed
Update documentation
1 parent 1447cd6 commit 4694f38

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

docs/index.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ Basic usage of the library includes a few steps:
113113
- then, apply the [validator](#validator) to [object](#object) that must be validated;
114114
- finally, check the results and print [report](#report) if applicable.
115115

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.
117117

118118
# Definitions
119119

@@ -150,6 +150,14 @@ Variable or value used as a validation sample in [operator](#operator).
150150
##### *Operator*
151151
Atomic validation condition.
152152

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+
153161
##### *Property*
154162
Method or member variable of C++ class or structure that must be validated, see [Properties](#properties).
155163

@@ -1500,7 +1508,7 @@ There are three built-in adapter types implemented in `cpp-validator` library:
15001508

15011509
### Single member adapter
15021510

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:
15041512
- `make_single_member_adapter(member_path,val,reporter)` where
15051513
- `member_path` is a [member](#member) specified in [member notation](#member-notation);
15061514
- `val` is a variable to validate;

0 commit comments

Comments
 (0)