added validate() on registerCtrl
tests for validate()