Add more validation function to user registration.