Validating password

When you have to work with form data submitted by a browser view, code quickly becomes very hard to read.

There are libraries out there designed to make this process easier to manage. If you find yourself in the situation of having many forms, you might want to give it a try.

Or, if you prefer, you could download my copy of JOBINFO_H, available here: When we call this API, we will pass it a user-id and password, and it'll either return a "profile handle" in the Handle parameter, or it'll give us an error in the Error Code parameter.

We'll use this profile handle for the API that we discuss in the next topic.

For example, it's quite common for a sub-set of users to use their username/email as their password.

When users register on an application, they typically provide an email/username and a password. NET Core Identity lets you provide validation rules for the password, to try and prevent users from using passwords that are too simple.Form validation provides additional behaviors to programmatically trigger validation for either the form or an individual field, and check validation on the form or individual fields.Please see the behaviors section for an explanation on syntax.For example, in the following example I've used my username as my password: and it meets all the rules: more than 6 characters, upper and lower, number, even a special character ! Let's create a validator to catch this common no-no. Unfortunately, it's no good for the validator we're trying to create - we need access to the Now when you try and use your username as a password to register a new user you'll get a nice friendly warning to tell you to stop being stupid! NET Core Identity includes a variety of password rules that you configure, such as password length, and required character types. You can write your own password validators by implementing when configuring Identity.

Leave a Reply