How can I check that a string is valid email address in twig template ?
For example, in this code:
{% set usernameType = (#Check user.username is email#) ? 'email' : 'number' %}
I need if user.username is a valid email address, usernameType set as email, otherwise set as number