validation BUGFIX mandatory nodes with when

Validation can be generated only if all the
node's when are true, it is disabled otherwise.
diff --git a/src/validation.h b/src/validation.h
index a5c4ffb..9a7a6b0 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -49,8 +49,8 @@
  * @param[in,out] diff Validation diff.
  * @return LY_ERR value.
  */
-LY_ERR lyd_validate_unres(struct lyd_node **tree, struct ly_set *node_when, struct ly_set *node_types, struct ly_set *meta_types,
-        struct lyd_node **diff);
+LY_ERR lyd_validate_unres(struct lyd_node **tree, struct ly_set *node_when, struct ly_set *node_types,
+        struct ly_set *meta_types, struct lyd_node **diff);
 
 /**
  * @brief Validate new siblings. Specifically, check duplicated instances, autodelete default values and cases.
@@ -70,13 +70,14 @@
  * @brief Perform all remaining validation tasks, the data tree must be final when calling this function.
  *
  * @param[in] first First sibling.
+ * @param[in] parent Data parent.
  * @param[in] sparent Schema parent of the siblings, NULL for top-level siblings.
  * @param[in] mod Module of the siblings, NULL for nested siblings.
  * @param[in] val_opts Validation options (@ref datavalidationoptions).
  * @param[in] op Operation to validate (@ref datavalidateop) or 0 for data tree
  * @return LY_ERR value.
  */
-LY_ERR lyd_validate_final_r(struct lyd_node *first, const struct lysc_node *sparent, const struct lys_module *mod,
-        uint32_t val_opts, LYD_VALIDATE_OP op);
+LY_ERR lyd_validate_final_r(struct lyd_node *first, const struct lyd_node *parent, const struct lysc_node *sparent,
+        const struct lys_module *mod, uint32_t val_opts, LYD_VALIDATE_OP op);
 
 #endif /* LY_VALIDATION_H_ */