[1.7.x] Fixed #22579 -- Corrected validation for email to reject trailing slash

Backport of 424fe76349a2e34eafef13c2450a7a1f4d3115a6 from master.