[IMP] misc: export the validate function

The props validation code is actually quite difficult to get right.
Also, it is sometimes useful to be able to validate an object against a
specified schema. Therefore, this commit exports the standalone validate
function as an utility function.
This commit is contained in:
Géry Debongnie
2022-05-22 10:44:09 +02:00
parent 4779707923
commit 1fe0bf08b1
4 changed files with 26 additions and 0 deletions
+2
View File
@@ -243,6 +243,8 @@ class ComponentB extends owl.Component {
};
```
Note: the props validation code is done by using the [validate utility function](utils.md#validate).
## Good Practices
A `props` object is a collection of values that come from the parent. As such,