use validate for name and email