Added function checkRegForm()