Now if I try to submit the form with the email field input empty, I’ll get a small error bubble from Phoenix with something saying: “Please, fill out this field.”
Could anyone please tell me how can I translate this error message?
I know I can use gettext but I do not understand where should I call the gettext function since the string “Please fill out this field” is not written anywhere in the code.
That bubble message you get is not from Phoenix, but from your browser (if you remove required: :true, you will get Phoenix’s message which is can't be blank)
For the Phoenix error messages, check priv/gettext/errors.pot
It shouldn’t say that at all, I guess you have a validation form error raised earlier than before the browser can yell at you for an invalid email field.
When I remove the required: :true option, I don’t get the can't be blank message that @sfusato mentionend; hence why I decided to write some small javascript.
That might be the reason why also the title property does not work?
Also this form is not used to create a user, it is mostly for login so it has nothing to do with Ecto (who, as far as I know, usually displays those error this field can't be blank type of message).