diff --git a/src/tree_data.c b/src/tree_data.c
index 866a64f..9b4abd7 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -196,19 +196,21 @@
 
 API LY_ERR
 lyd_value_validate(const struct ly_ctx *ctx, const struct lyd_node_term *node, const char *value, size_t value_len,
-                   ly_clb_resolve_prefix get_prefix, void *get_prefix_data, LYD_FORMAT format, const struct lyd_node *tree)
+                   ly_clb_resolve_prefix get_prefix, void *get_prefix_data, LYD_FORMAT format,
+                   const struct lyd_node *tree, struct lysc_type **realtype)
 {
     LY_ERR rc;
     struct ly_err_item *err = NULL;
     struct lysc_type *type;
-    int options = (tree ? 0 : LY_TYPE_OPTS_INCOMPLETE_DATA);
+    struct lyd_value val = {0};
+    int options = (tree ? 0 : LY_TYPE_OPTS_INCOMPLETE_DATA) | (realtype ? LY_TYPE_OPTS_STORE : 0);
 
     LY_CHECK_ARG_RET(ctx, node, value, LY_EINVAL);
 
     type = ((struct lysc_node_leaf*)node->schema)->type;
     rc = type->plugin->store(ctx ? ctx : node->schema->module->ctx, type, value, value_len, options,
                              get_prefix, get_prefix_data, format, tree ? (void*)node : (void*)node->schema, tree,
-                             NULL, NULL, &err);
+                             &val, NULL, &err);
     if (rc == LY_EINCOMPLETE) {
         return rc;
     } else if (rc) {
@@ -222,6 +224,11 @@
         return rc;
     }
 
+    if (realtype) {
+        *realtype = val.realtype;
+    }
+
+    type->plugin->free(ctx ? ctx : node->schema->module->ctx, &val);
     return LY_SUCCESS;
 }
 
diff --git a/src/tree_data.h b/src/tree_data.h
index c5fab5d..531bb2f 100644
--- a/src/tree_data.h
+++ b/src/tree_data.h
@@ -818,12 +818,14 @@
  * @param[in] tree Data tree (e.g. when validating RPC/Notification) where the required data instance (leafref target,
  *            instance-identifier) can be placed. NULL in case the data tree is not yet complete,
  *            then LY_EINCOMPLETE can be returned.
+ * @param[out] realtype Optional real type of the value.
  * @return LY_SUCCESS on success
  * @return LY_EINCOMPLETE in case the @p trees is not provided and it was needed to finish the validation (e.g. due to require-instance).
  * @return LY_ERR value if an error occurred.
  */
 LY_ERR lyd_value_validate(const struct ly_ctx *ctx, const struct lyd_node_term *node, const char *value, size_t value_len,
-                          ly_clb_resolve_prefix get_prefix, void *get_prefix_data, LYD_FORMAT format, const struct lyd_node *tree);
+                          ly_clb_resolve_prefix get_prefix, void *get_prefix_data, LYD_FORMAT format,
+                          const struct lyd_node *tree, struct lysc_type **realtype);
 
 /**
  * @brief Compare the node's value with the given string value. The string value is first validated according to the node's type.
diff --git a/tests/utests/data/test_types.c b/tests/utests/data/test_types.c
index 1a501c9..8492f5b 100644
--- a/tests/utests/data/test_types.c
+++ b/tests/utests/data/test_types.c
@@ -945,17 +945,17 @@
     /* key-predicate */
     data = "/a:list2[a:id='a'][a:value='b']/a:id";
     assert_int_equal(LY_ENOTFOUND, lyd_value_validate(s->ctx, (const struct lyd_node_term*)tree->prev->prev, data, strlen(data),
-                                                   test_instanceid_getprefix, tree->schema->module, LYD_XML, tree));
+                                                   test_instanceid_getprefix, tree->schema->module, LYD_XML, tree, NULL));
     logbuf_assert("Invalid instance-identifier \"/a:list2[a:id='a'][a:value='b']/a:id\" value - instance not found. /");
     /* leaf-list-predicate */
     data = "/a:leaflisttarget[.='c']";
     assert_int_equal(LY_ENOTFOUND, lyd_value_validate(s->ctx, (const struct lyd_node_term*)tree->prev->prev, data, strlen(data),
-                                                   test_instanceid_getprefix, tree->schema->module, LYD_XML, tree));
+                                                   test_instanceid_getprefix, tree->schema->module, LYD_XML, tree, NULL));
     logbuf_assert("Invalid instance-identifier \"/a:leaflisttarget[.='c']\" value - instance not found. /");
     /* position predicate */
     data = "/a:list_keyless[4]";
     assert_int_equal(LY_ENOTFOUND, lyd_value_validate(s->ctx, (const struct lyd_node_term*)tree->prev->prev, data, strlen(data),
-                                                   test_instanceid_getprefix, tree->schema->module, LYD_XML, tree));
+                                                   test_instanceid_getprefix, tree->schema->module, LYD_XML, tree, NULL));
     logbuf_assert("Invalid instance-identifier \"/a:list_keyless[4]\" value - instance not found. /");
 
     lyd_free_all(tree);
