Formatos para direcciones e-mail o direcciones de viviendas

My Spanish is not so bueno, but I agree with Jorge that you probably don't want to have strict constraints here.

This is especially true with email addresses because the email address specification is maddening. For me, the best way to validate an email is to send an email to that address with a link inside and see if someone clicks that link. The next best way, especially if you are offline, is to make sure there is no obvious typo.

So what I check is at least one non-whitespace character, followed by an @, followed by at least one non-whitespace character, followed by an ., and then at least one non-whitespace character. Something like this:
regex(., '\S+@\S+\.\S+')

That should allow most common email addresses and typos like whitespaces and missing the @ and the period. Technically, this will reject valid email addresses (e.g., bob@local) but it's good enough.

1 Like