Title: [Plugin: Posts 2 Posts] Validating mandatory relationship
Last modified: August 20, 2016

---

# [Plugin: Posts 2 Posts] Validating mandatory relationship

 *  [aaron@rossano.com.au](https://wordpress.org/support/users/aaronrossanocomau/)
 * (@aaronrossanocomau)
 * [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-validating-mandatory-relationship/)
 * Hi,
    Is there a way to setup a relationship as mandatory.
 * This is my guess:
    I could probably create a function condition that will be 
   similar to this: [http://wordpress.org/support/topic/plugin-posts-2-posts-filtering-connections-by-author?replies=15](http://wordpress.org/support/topic/plugin-posts-2-posts-filtering-connections-by-author?replies=15)
   where the it’ll use the ‘p2p_new_post_args’. but that’s just for new posts. how
   would I do it for updating posts to make sure the relationship wasn’t removed
   after the post was created?
 * [http://wordpress.org/extend/plugins/posts-to-posts/](http://wordpress.org/extend/plugins/posts-to-posts/)

The topic ‘[Plugin: Posts 2 Posts] Validating mandatory relationship’ is closed 
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-to-posts_7a8e9d.svg)
 * [Posts 2 Posts](https://wordpress.org/plugins/posts-to-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-to-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-to-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-to-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-to-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-to-posts/reviews/)

## Tags

 * [mandatory](https://wordpress.org/support/topic-tag/mandatory/)
 * [posts2posts](https://wordpress.org/support/topic-tag/posts2posts/)
 * [Relationship](https://wordpress.org/support/topic-tag/relationship/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * 0 replies
 * 1 participant
 * Last reply from: [aaron@rossano.com.au](https://wordpress.org/support/users/aaronrossanocomau/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/plugin-posts-2-posts-validating-mandatory-relationship/)
 * Status: not resolved