Because the input type obscures the text typed, you should let the user confirm that they haven't made a mistake.
The simplest way to do this is to have the password entered twice, and then check that they are identical.
For the second example, the second text field (age) was switched to email which will be validated with a bit of custom logic.
The code is taken from the Stack Overflow question, How to validate email address in Java Script? This is an awesome question because it makes your most intense Facebook political/religious argument look like a slight disagreement over who makes the best beer. Here is the HTML, even though it’s really close to the first example. You can play with this example here: See the Pen form validation 2 by Raymond Camden (@cfjedimaster) on Code Pen. This tells Vue to cast the value to a number when you use it.
Another method is to display what they've entered as part of a 'confirmation page'.
The problem here is that you're making the password visible in the browser, browser cache, proxy, etc.
For the third example, we’ve built something you’ve probably seen in survey apps. However, there is a bug with this feature such that when the value is blank, it turns back into a string. To make it a bit easier for the user, we also added a current total right below so they can see, in real time, what their total is. We set up the total value as a computed value, and outside of that bug I ran into, it was simple enough to setup.
The user is asked to spend a “budget” for a set of features for a new Star Destroyer model. My check Form method now just needs to see if the total is 100 and that’s it.Here are some simple steps to make the process more secure.If the purpose of registration is to confirm that the person exists, and that they have supplied a valid email address, then as part of the registration process you a should email them either: a random password; or a confirmation token.In some cases, such as on mobile devices, displaying the password may improve usability without compromising security.After all it's only the browser display being obfuscated and not the data transfer.This will render a simple list of errors on top of the form.