Password reset button

You could use JavaScript / jQuery for some things

It could check to make sure the format is valid before the form is submitted and give the user a type of “invalid format” or “cap lock is on” message.

But the form input values should be sent to the server and tested thoroughly there before anything is actually done with the data.

If the name and password make it through the tests. then have the server send a “password reset requested” email to that users email address with an expiring “token”