validate partner id

I've included validation for partner id and added its test cases.