I have a leaf that is defined as a string of length 5. I accidentally used SET to return a length 10 string, which was accepted (but failed validation on the other device because they checked the length).
Is there a way to get feedback internally that I’m violating a type restriction in the yang when I’m writing the data within the callback?
leaf id { type string { length 5; } }
char id[BUFSIZE] = {0};
snprintf(id, sizeof(id) - 1, "0000000000");
CONFD_SET_STR(v, id);
id fails type checks at other end due to invalid length