I'm having trouble implementing the login feature. In short, the default validation check is no good

I’m having trouble implementing the login feature. In short, the default validation check is no good.

First, let’s assume that there are fields for “email address” and “password”. “This input should not be empty” is unchecked, and the INPUT elements are set to email type and number only.

Then there is a “Submit button”.

This “Submit button” will not trigger the workflow if the input email address is not in the correct format.

This is the barrier for me. When the email address field is filled in incorrectly (for example, ABC.AB.com), I want to display an error message that the email address format is incorrect when the submit button is clicked. Is there a good way to do this?

I thought about using “An input’s value is changed” to make it work, but it’s not working. .

Additional Note: If possible, I would like to prevent the focus from being automatically focused on the input element when an error occurs in the field, but I feel this is impossible.

You can use this simple approach.

Insert a text under the input(X) element, set it not to be visible on page load, then you can manually set the text to be “wrong email”…

So there gonna be a condition that will show the text element which will be;
when inputX isn’t Valid
make it visible…
This should work

All the best.

for what its worth i use an external service to validate email adresses duing sign up https://www.zerobounce.net/ (in not afiliated with them) there are many such services.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.