For example {limit [5-50] for here}@email.com
email@hotmail.com -> incorrect, because count of characters input smaller then 5 tryemail@hotmail.com -> correct
Can you explain the solution ?
For example {limit [5-50] for here}@email.com
email@hotmail.com -> incorrect, because count of characters input smaller then 5 tryemail@hotmail.com -> correct
Can you explain the solution ?
Maybe as simple as this:
local_part, domain = email.split('@')
local_part.length < 5
Though keep in mind many people do have short addresses, so don't get too strict here.
You could also do this with a regular expression:
email.match?(/\A[^@]{5,50}@[^@]+\z/)
Where that's an extremely lax parser.