Add link to server validation message

Hello guys,

I have a server validation to check if the e-mail is already on my database. My client ask to add a link to “Forgot password” in the “e-mail already registed” message, in case e-mail is on my database. How to do this?

The message is supposed to be: “Email already registered, forgot your password?”

Thanks!

@Teodor any tip? :smiley:

Not sure you can add it directly to the validation message. You could try adding the html right to the validation message but I am unsure that would work.

You could have a hidden region right below your input field that shows if the field is invalid. Just brainstorming. Interesting idea putting a link there. Curious how you make out.

1 Like

I tried that...doesn't work...

You could have a hidden region right below your input field that shows if the field is invalid. Just brainstorming. Interesting idea putting a link there. Curious how you make out.

Going to try!

Thanks Brad!

If the email already exists, the action throws an invalid event.

You could use that event as a trigger to do whatever.

1 Like

Thanks Ben! I gonna try this as well and let you all know!

I’m curious, did Ben’s suggestion work?

This is a weak-point for a brute-force attack to extract emails which have account on the app.
For incorrect password or username, message shown should be generic - "Invalid username or password. Please try again."
Also, another step on securing the app would be to put in IP based checks to block requests if a single system keeps sending credentials to see what sticks.

Not necessary for all apps, but just something to keep in mind.

P.S. I am not an expert on this stuff.. just skeptical about security.

Hello guys! @ben solution works for this case, where I have only one server side validation.
When invalid, I’m showing a modal with an error message…I don’t know how this would work if I have more than 1 server side validations.

Thanks Ben!

1 Like