I'm trying to do a server validation for both username and email to confirm if it exist in the database, but it not working. 
Your wording sounds like you want to pass validation if the User name and password do exist in the database. Is this correct? Or are you trying to ensure that the username and password do not exist already?


