add helper method for model valid/invalid test

><