validate dp and p