pcplolo, I may have misunderstand but I don't think data partition can meet requirements here.
I'm not aware on the possibility to have some "if" statement in Data partition constraints.
However for your requirements dav9401 ansd if you can accomodate to wait for the user to click on the save button you can look to enforce this by using status transition and associated condition assuming you work on R/I/P/C forms or use presave spl trigger as describe in the post .
May you want to do it prior the save (in javascript so will only be enforced in the web interface ), you can look in this another post there for idea on similar.
Hope this help
/J