Necessary and sufficient conditions for the regularity and stability for some partial functional differential equations with infinite delay