Skip to content

Commit fba7d3a

Browse files
committed
docs: writing docs on constraints.
1 parent 6eb3112 commit fba7d3a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ The `validate()` validates the following:
120120
- On enumerations (objects inheriting from the `Enum` class), it will also check the `isValid` property. However, usually, if enumerations are creating through their `byId()` function, if they are not valid, then `byId()` will have returned `undefined`.
121121

122122
### Constraints
123-
The easiest way to validate objects is to use constraints.
123+
The easiest way to validate objects is to use constraints. By adding constraints, as decorators, to the properties and functions on the object you would like to validate, these properties and functions will be checked when the object is validated through calling `validate(myObject)`. easy comes with a variety of ready-to-use constraints, but it is also easy (no pun intended) to add your own.
124+
124125

125126
# Data
126127
It is the responsibility of the classes in the data layer to fetch and deliver data from outside to the microservices. This data can come from e.g. a file system, relational and other types of databases (we prefer document databases), or from other services on your domain, or from services outside your domain. Classes performing this function are called gateways.

0 commit comments

Comments
 (0)