moved validate method from gotoPage to paginator
next and previous page buttons