added validation for all required inputs on the registration form