validation NEW state data checking
Separate flag for validation and parsers.
The reason is to allow not validating
parsed data but checking for state data
such as for <get-config> reply.
diff --git a/src/tree_data.c b/src/tree_data.c
index 976d9e2..9ab42ef 100644
--- a/src/tree_data.c
+++ b/src/tree_data.c
@@ -279,6 +279,11 @@
LY_CHECK_ARG_RET(ctx, ctx, NULL);
+ if ((options & LYD_OPT_PARSE_ONLY) && (options & LYD_VALOPT_MASK)) {
+ LOGERR(ctx, LY_EINVAL, "Passing validation flags with LYD_OPT_PARSE_ONLY is not allowed.");
+ return NULL;
+ }
+
#if 0
if (options & LYD_OPT_RPCREPLY) {
/* first item in trees is mandatory - the RPC/action request */