Binomial parameter checking

The error message is inconsistent with the test. The test is for p-1 being nonnegative but you say that p should be nonnegative. Which one is right?