Is it possible to have an expression as validation point in YANG?

I have an input and that can be only multiples of 2. Is there a way to do this in YANG itself or should I do the validation in the backend ? In other words, is there a way to do validation against some expression ?

hello,
you can see similar question with my answer here… Must remainder check, just modify for your specific number/needs… :slight_smile:

Thanks for the reply the example you pointed out is for" modulo" operation and I am looking for “power of” validation…so just wondering is there any as such in-built operands/function

Sorry if my original question was not clear enough