added validation for registration form without saving to db