Shouldn't you do this at the start of the test so you can be sure that the invalid number really goes to the first page.