# Validation on delete

**URL:** <https://dmap-community.ductus.global/t/validation-on-delete/1718>\
**Category:** YANG\
**Created:** [January 2, 2018, 11:39pm UTC](https://dmap-community.ductus.global/t/validation-on-delete/1718 "2018-01-02T23:39:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aruns17](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@aruns17](https://dmap-community.ductus.global/u/aruns17)\
**Post date:** [January 2, 2018, 11:39pm UTC](https://dmap-community.ductus.global/t/validation-on-delete/1718/1 "2018-01-02T23:39:10Z")

</div>

I have a list with many leaves. As part of some of the leaf entries, i have some validations to be done.

Now, how do i add validation on the list node delete ?

list xxx {  
…  
tailf:validate my\_func \<\<\<\<\<\<\<\<\<\<\< this gets called on any change in list  
leaf aaa {  
…  
tailf:validate my\_func1  
}  
leaf bbb {  
…  
tailf:validate my\_func1  
}  
leaf cccc {  
… \<\<\<\< no validation \>\>\>  
}  
…  
}

---

<div class="post-metadata">

**Author:** ![waitai](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/waitai/32/436_2.png) [@waitai](https://dmap-community.ductus.global/u/waitai)\
**Post date:** [January 3, 2018, 11:26pm UTC](https://dmap-community.ductus.global/t/validation-on-delete/1718/2 "2018-01-03T23:26:06Z")

</div>

> [@aruns17](#):
>
> Now, how do i add validation on the list node delete ?

This is being addressed in Chapter 9.6, Validation Points, in the ConfD User Guide. Depending on your use case, you can either define a XPATH must statement in your YANG model or add the validation point to other parts of the YANG model that the leaf node that is being deleted is dependent on.
