diff --git a/src/validation.c b/src/validation.c
index f75dc04..421863e 100644
--- a/src/validation.c
+++ b/src/validation.c
@@ -31,6 +31,19 @@
 #include "tree_schema_internal.h"
 #include "xpath.h"
 
+/**
+ * @brief Just like lys_getnext() but iterates over all data instances of the schema nodes.
+ *
+ * @param[in] last Last returned data node.
+ * @param[in] sibling Data node sibling to search in.
+ * @param[in,out] slast Schema last node, set to NULL for first call and do not change afterwards.
+ * May not be set if the function is used only for any suitable node existence check (such as the existence
+ * of any choice case data).
+ * @param[in] parent Schema parent of the iterated children nodes.
+ * @param[in] module Schema module of the iterated top-level nodes.
+ * @return Next matching data node,
+ * @return NULL if last data node was already returned.
+ */
 static struct lyd_node *
 lys_getnext_data(const struct lyd_node *last, const struct lyd_node *sibling, const struct lysc_node **slast,
                  const struct lysc_node *parent, const struct lysc_module *module)
@@ -228,6 +241,13 @@
     return ret;
 }
 
+/**
+ * @brief Validate instance duplication.
+ *
+ * @param[in] first First sibling to search in.
+ * @param[in] node Data node instance to check.
+ * @return LY_ERR value.
+ */
 static LY_ERR
 lyd_validate_duplicates(const struct lyd_node *first, const struct lyd_node *node)
 {
@@ -269,6 +289,13 @@
     return LY_SUCCESS;
 }
 
+/**
+ * @brief Validate multiple case data existence with possible autodelete.
+ *
+ * @param[in,out] first First sibling to search in, is updated if needed.
+ * @param[in] choic Choice node whose cases to check.
+ * @return LY_ERR value.
+ */
 static LY_ERR
 lyd_validate_cases(struct lyd_node **first, const struct lysc_node_choice *choic)
 {
@@ -336,6 +363,13 @@
     return LY_SUCCESS;
 }
 
+/**
+ * @brief Check whether a schema node can have some default values (true for NP containers as well).
+ *
+ * @param[in] schema Schema node to check.
+ * @return non-zero if yes,
+ * @return 0 otherwise.
+ */
 static int
 lyd_val_has_default(const struct lysc_node *schema)
 {
@@ -362,6 +396,13 @@
     return 0;
 }
 
+/**
+ * @brief Autodelete old instances to prevent validation errors.
+ *
+ * @param[in,out] first First sibling to search in, is updated if needed.
+ * @param[in] node Data node instance to check.
+ * @param[in,out] next_p Temporary LY_LIST_FOR_SAFE next pointer, is updated if needed.
+ */
 static void
 lyd_validate_autodel_dup(struct lyd_node **first, struct lyd_node *node, struct lyd_node **next_p)
 {
@@ -437,6 +478,13 @@
     return LY_SUCCESS;
 }
 
+/**
+ * @brief Validate mandatory node existence.
+ *
+ * @param[in] first First sibling to search in.
+ * @param[in] snode Schema node to validate.
+ * @return LY_ERR value.
+ */
 static LY_ERR
 lyd_validate_mandatory(const struct lyd_node *first, const struct lysc_node *snode)
 {
@@ -459,6 +507,15 @@
     return LY_EVALID;
 }
 
+/**
+ * @brief Validate min/max-elements constraints, if any.
+ *
+ * @param[in] first First sibling to search in.
+ * @param[in] snode Schema node to validate.
+ * @param[in] min Minimum number of elements, 0 for no restriction.
+ * @param[in] max Max number of elements, 0 for no restriction.
+ * @return LY_ERR value.
+ */
 static LY_ERR
 lyd_validate_minmax(const struct lyd_node *first, const struct lysc_node *snode, uint32_t min, uint32_t max)
 {
@@ -498,8 +555,16 @@
     return LY_SUCCESS;
 }
 
+/**
+ * @brief Find node referenced by a list unique statement.
+ *
+ * @param[in] uniq_leaf Unique leaf to find.
+ * @param[in] list List instance to use for the search.
+ * @return Found leaf,
+ * @return NULL if no leaf found.
+ */
 static struct lyd_node *
-lyd_val_uniq_find_leaf(const struct lysc_node_leaf *uniq_leaf, struct lyd_node *list)
+lyd_val_uniq_find_leaf(const struct lysc_node_leaf *uniq_leaf, const struct lyd_node *list)
 {
     struct lyd_node *node;
     const struct lysc_node *iter;
@@ -510,7 +575,7 @@
         ++depth;
     }
 
-    node = list;
+    node = (struct lyd_node *)list;
     while (node && depth) {
         /* find schema node with this depth */
         for (i = depth - 1, iter = (struct lysc_node *)uniq_leaf; i; iter = lysc_data_parent(iter)) {
@@ -526,10 +591,10 @@
     return node;
 }
 
-/*
- * actions (cb_data):
- * 0  - compare all uniques
- * n  - compare n-th unique
+/**
+ * @brief Callback for comparing 2 list unique leaf values.
+ *
+ * @param[in] cb_data 0 to compare all uniques, n to compare only n-th unique.
  */
 static int
 lyd_val_uniq_list_equal(void *val1_p, void *val2_p, int UNUSED(mod), void *cb_data)
@@ -627,8 +692,16 @@
     return 0;
 }
 
+/**
+ * @brief Validate list unique leaves.
+ *
+ * @param[in] first First sibling to search in.
+ * @param[in] snode Schema node to validate.
+ * @param[in] uniques List unique arrays to validate.
+ * @return LY_ERR value.
+ */
 static LY_ERR
-lyd_validate_unique(const struct lyd_node *first, const struct lysc_node *snode, struct lysc_node_leaf ***uniques)
+lyd_validate_unique(const struct lyd_node *first, const struct lysc_node *snode, const struct lysc_node_leaf ***uniques)
 {
     const struct lyd_node *diter;
     struct ly_set *set;
@@ -738,6 +811,16 @@
     return ret;
 }
 
+/**
+ * @brief Validate data siblings based on generic schema node restrictions, recursively for schema-only nodes.
+ *
+ * @param[in] first First sibling to search in.
+ * @param[in] sparent Schema parent of the nodes to check.
+ * @param[in] mod Module of the nodes to check.
+ * @param[in] val_opts Validation options, see @ref datavalidationoptions.
+ * @param[in] op Operation being validated, if any.
+ * @return LY_ERR value.
+ */
 static LY_ERR
 lyd_validate_siblings_schema_r(const struct lyd_node *first, const struct lysc_node *sparent,
                                const struct lysc_module *mod, int val_opts, LYD_VALIDATE_OP op)
@@ -770,7 +853,7 @@
         if (snode->nodetype == LYS_LIST) {
             slist = (struct lysc_node_list *)snode;
             if (slist->uniques) {
-                LY_CHECK_RET(lyd_validate_unique(first, snode, slist->uniques));
+                LY_CHECK_RET(lyd_validate_unique(first, snode, (const struct lysc_node_leaf ***)slist->uniques));
             }
         }
 
@@ -783,6 +866,11 @@
     return LY_SUCCESS;
 }
 
+/**
+ * @brief Validate obsolete nodes, only warnings are printed.
+ *
+ * @param[in] node Node to check.
+ */
 static void
 lyd_validate_obsolete(const struct lyd_node *node)
 {
@@ -799,6 +887,13 @@
     } while (snode && (snode->nodetype & (LYS_CHOICE | LYS_CASE)));
 }
 
+/**
+ * @brief Validate must conditions of a data node.
+ *
+ * @param[in] node Node to validate.
+ * @param[in] op Operation being validated, if any.
+ * @return LY_ERR value.
+ */
 static LY_ERR
 lyd_validate_must(const struct lyd_node *node, LYD_VALIDATE_OP op)
 {
@@ -1037,11 +1132,18 @@
 }
 
 /**
- * @param[in] validate_options Options for the validation phase, see @ref datavalidationoptions.
+ * @brief Validate the whole data subtree.
+ *
+ * @param[in] root Subtree root.
+ * @param[in,out] type_check Set for unres node types.
+ * @param[in,out] type_meta_check Set for unres metadata types.
+ * @param[in,out] when_check Set for nodes with when conditions.
+ * @param[in] val_opts Validation options, see @ref datavalidationoptions.
+ * @return LY_ERR value.
  */
 static LY_ERR
 lyd_validate_subtree(struct lyd_node *root, struct ly_set *type_check, struct ly_set *type_meta_check,
-                     struct ly_set *when_check, int validate_options)
+                     struct ly_set *when_check, int val_opts)
 {
     const struct lyd_meta *meta;
     struct lyd_node *next, *node;
@@ -1063,7 +1165,7 @@
 
                 /* add nested defaults */
                 LY_CHECK_RET(lyd_validate_defaults_r(node, lyd_node_children_p((struct lyd_node *)node), NULL, NULL, type_check,
-                                                     when_check, validate_options));
+                                                     when_check, val_opts));
             }
 
             if (!(node->schema->nodetype & (LYS_RPC | LYS_ACTION | LYS_NOTIF)) && node->schema->when) {
@@ -1078,6 +1180,16 @@
     return LY_SUCCESS;
 }
 
+/**
+ * @brief Validate data tree.
+ *
+ * @param[in,out] tree Data tree to validate, nodes may be autodeleted.
+ * @param[in] modules Array of modules to validate, NULL for all modules.
+ * @param[in] mod_count Count of @p modules.
+ * @param[in] ly_ctx libyang context.
+ * @param[in] val_opts Validation options, see @ref datavalidationoptions.
+ * @return LY_ERR value.
+ */
 static LY_ERR
 _lyd_validate(struct lyd_node **tree, const struct lys_module **modules, int mod_count, const struct ly_ctx *ctx,
               int val_opts)
@@ -1145,9 +1257,18 @@
     return _lyd_validate(tree, modules, mod_count, NULL, val_opts);
 }
 
+/**
+ * @brief Find nodes for merging an operation into data tree for validation.
+ *
+ * @param[in] op_tree Full operation data tree.
+ * @param[in] op_node Operation node itself.
+ * @param[in] tree Data tree to be merged into.
+ * @param[out] op_subtree Operation subtree to merge.
+ * @param[out] tree_sibling Data tree sibling to merge next to.
+ */
 static void
-lyd_val_op_merge_find(const struct lyd_node *op_tree, const struct lyd_node *op, const struct lyd_node *tree,
-                      struct lyd_node **op_node, struct lyd_node **tree_sibling)
+lyd_val_op_merge_find(const struct lyd_node *op_tree, const struct lyd_node *op_node, const struct lyd_node *tree,
+                      struct lyd_node **op_subtree, struct lyd_node **tree_sibling)
 {
     const struct lyd_node *tree_iter, *op_iter;
     struct lyd_node *match;
@@ -1155,17 +1276,17 @@
 
     /* learn op depth (top-level being depth 0) */
     op_depth = 0;
-    for (op_iter = op; op_iter != op_tree; op_iter = (struct lyd_node *)op_iter->parent) {
+    for (op_iter = op_node; op_iter != op_tree; op_iter = (struct lyd_node *)op_iter->parent) {
         ++op_depth;
     }
 
     /* find where to merge op */
     tree_iter = tree;
     cur_depth = op_depth;
-    op_iter = op;
+    op_iter = op_node;
     while (cur_depth) {
         /* find next op parent */
-        op_iter = op;
+        op_iter = op_node;
         for (i = 0; i < cur_depth; ++i) {
             op_iter = (struct lyd_node *)op_iter->parent;
         }
@@ -1183,7 +1304,7 @@
         --cur_depth;
     }
 
-    *op_node = (struct lyd_node *)op_iter;
+    *op_subtree = (struct lyd_node *)op_iter;
     *tree_sibling = (struct lyd_node *)tree_iter;
 }
 
