Re: Yang validation and Application Validation ( tailf:validate)

For a leaf in a list, i have
– validation done using yang
– validation done using application (tailf:validate )

When both exists, which validation gets triggered first.

Basically, my use case is.
– use Yang to compare the entered items in the list item level.
– use application validation to check against all the list items.

I dont see consistent behavior on what gets triggered 1st or last.

The default order is undefined, but you can use tailf:priority as substaement to tailf:validate to ensure that your validation callbacks are invoked after (but not before) evaluation of ‘must’ statements and the like - see the tailf_yang_extensions(5) manual page. But please consider that there are few if any cases that require you to use tailf:validate - if you can’t express the constraint as a ‘must’ statement, chances are that your constraint has a problem, such as attempting to validate changes rather than the resulting configuration - see the “Semantic validation” chapter in the User Guide.